I was just browsing a forum and someone asked about a PHP file they had found on the web. It has several spots like this in the code:
if ($REMOTE_ADDR == \"\"
In my opinion
if ($REMOTE_ADDR == "") $ip = "no ip"; else $ip = getHostByAddr($REMOTE_ADDR);
is valid, but much harder to read than:
if ($REMOTE_ADDR == "") { $ip = "no ip"; } else { $ip = getHostByAddr($REMOTE_ADDR); }