Depends what happens between those two calls. Otherwise yes, those are the same. The order makes no difference. Using 2 equals
== A string of 1 and integer of 1, will return true when compared. Type is ignored, only value is compared. So no wierdness.
<? $a=(string) 1; $b=(int) 1; var_dump($a); var_dump($b); echo $a==$b;
To clarify, there is absolutely nothing you can ever put in $a or $b to get a different output on the comparison, just by putting it on the other side of the operator.
$a="1234"; $b="1234"; echo $a==$b; echo $b==$a;
The output of that, for any $a or $b values, will always without a doubt be true true, or false false.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki