Re: [PHP] comparison efficieny

2003-11-13 Thread Burhan Khalid
Jon Hill wrote: I am sure I read somewhere that doing the following if (false === $variable) was a better option than if ($variable === false) maybe it was a dream or is there something in this? === is type-safe comparison (iirc) == is not type-safe = is assignment (obviously) if

[PHP] comparison efficieny

2003-11-12 Thread Jon Hill
I am sure I read somewhere that doing the following if (false === $variable) was a better option than if ($variable === false) maybe it was a dream or is there something in this? Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] comparison efficieny

2003-11-12 Thread Marek Kilimajer
Jon Hill wrote: I am sure I read somewhere that doing the following if (false === $variable) was a better option than if ($variable === false) maybe it was a dream or is there something in this? Jon The later will give error if you mistakenly use single =, which can spare you frustration