note 100082 deleted from language.operators.comparison by cmb
| From: | cmb@php.net | Date: | Sun, 11 Aug 2019 11:45:52 +0000 |
| Subject: | note 100082 deleted from language.operators.comparison by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-211846@lists.php.net to get a copy of this message | ||
Note Submitter: me at lx dot sg
----
Replying to the comment on Aug 6, 2010, the comparisons return TRUE because they are recognized as
numerical strings and are converted to integers. If you try "abc" == " abc", it
will return FALSE as expected. To avoid the type conversions, simply use the identity operator
(===).