note 102802 added to language.operators.logical
| From: | contact at linosilva dot com | Date: | Mon, 07 Mar 2011 16:11:37 +0000 |
| Subject: | note 102802 added to language.operators.logical | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177629@lists.php.net to get a copy of this message | ||
That's why you shouldn't use "==" to compare two variables that have different
types. It gives you the result of the comparison alright, but only after type juggling.
Instead, try the "Identical" ( "===" ) comparison.
What I fail to understand though, is what that has to do with logical operators.
Cheers.
----
Server IP: 69.147.83.197
Probable Submitter: 188.82.86.187
----
Manual Page -- http://www.php.net/manual/en/language.operators.logical.php
Edit -- https://master.php.net/note/edit/102802
Del: integrated -- https://master.php.net/note/delete/102802/integrated
Del: useless -- https://master.php.net/note/delete/102802/useless
Del: bad code -- https://master.php.net/note/delete/102802/bad+code
Del: spam -- https://master.php.net/note/delete/102802/spam
Del: non-english -- https://master.php.net/note/delete/102802/non-english
Del: in docs -- https://master.php.net/note/delete/102802/in+docs
Del: other reasons-- https://master.php.net/note/delete/102802
Reject -- https://master.php.net/note/reject/102802
Search -- https://master.php.net/manage/user-notes.php