on 10/1/03 8:23 PM, Gerard Samuel at [EMAIL PROTECTED] wrote: > I've noticed code written in this order -> > if (FALSE === $foo) > { > // yada yada > } > > Is there a reason/benefit to test variables like that instead of -> > if ($foo === FALSE) > { > // yada yada > } > > Thanks
I think it's more to catch errors.. for example.. if I typed this: if ($foo = FALSE) You will not get an error since you are assigning $foo the value of FALSE while if you did this: if (FALSE = $foo) PHP will throw up an error because you can not assign FALSE the value of $foo :) That's the only reason that I can think of. Cheers! Rick "You've got to stand for something or you will fall for anything" - Unknown -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php