Welcome to WebmasterWorld Guest from 54.160.163.163

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP compare order?

Does it matter in php?

     

HeadBut

9:55 pm on Sep 24, 2008 (gmt 0)

10+ Year Member



In PHP does it matter which way you compare?

if("Registesr" == $SomeVariableOr['Thing']){DoSomething();}
Or
If($SomeVariableOr['Thing'] == "Register"){DoSomething();}

Thanks

eelixduppy

10:13 pm on Sep 24, 2008 (gmt 0)

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member



Not for this case. It would obviously matter if you were using other comparison operators such as less than (<) or greater than (>), though.