note 99376 deleted from language.operators.type by danbrown
| From: | danbrown@php.net | Date: | Fri, 13 Aug 2010 14:40:32 +0000 |
| Subject: | note 99376 deleted from language.operators.type by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171649@lists.php.net to get a copy of this message | ||
Note Submitter: java dork at gmail com
----
In my humble opinion, the second var_dump(...) call in example #5 should return false, regardles of
PHP traditions. The variable $a does NOT contain an instance of a String. The instanceof operator
should not look at the VALUE of $c, merely it's type. I am unaware of the internals of this
operator, but it seems inefficient (involving a possible strcmp) and inconsistent.