note 99709 deleted from language.operators.comparison by danbrown
| From: | danbrown@php.net | Date: | Tue, 31 Aug 2010 22:49:10 +0000 |
| Subject: | note 99709 deleted from language.operators.comparison by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-172219@lists.php.net to get a copy of this message | ||
Note Submitter: winklerd at gmail dot com
----
Have you tried using ===? It should force a strict comparison, taking types into account.
php -r 'echo "1234" == " 1234" ? "MATCH\n" : "NO
MATCH\n";'
MATCH
php -r 'echo "1234" === " 1234" ? "MATCH\n" : "NO
MATCH\n";'
NO MATCH