Re: PHP Editor - which to use?

From: Date: Wed, 24 Sep 2003 13:54:35 +0000
Subject: Re: PHP Editor - which to use?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-163738@lists.php.net to get a copy of this message
Hi, > Good coder will understand this at a glimpse: [snip horrible code] > if($pos_params!=false) Assuming it's a boolean, $pos_params is *already* true or false, so testing it like this is pretty much pointless. It makes more sense (and is much more readable IMHO) to do something like this: if ($pos_params) { // something } I'm not sure how the PHP interpreter works internally but that might even save your script the overhead of an unnecessary comparison ;-) Cheers Jon

« previous php.general (#163738) next »