#39435 [Opn->Asn]: wrong instanceof results
| From: | tony2001@php.net | Date: | Wed, 08 Nov 2006 17:44:39 +0000 |
| Subject: | #39435 [Opn->Asn]: wrong instanceof results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104640@lists.php.net to get a copy of this message | ||
ID: 39435
Updated by: tony2001@php.net
Reported By: mp at webfactory dot de
-Status: Open
+Status: Assigned
Bug Type: Class/Object related
Operating System: any
PHP Version: 5.2.0
-Assigned To:
+Assigned To: dmitry
Previous Comments:
------------------------------------------------------------------------
[2006-11-08 17:36:17] mp at webfactory dot de
Description:
------------
instanceof produces wrong results when the first operand is not an
object instance but a class name or a string containing a class name.
Reproduce code:
---------------
var_dump(Iterator instanceof Traversable);
var_dump("Iterator" instanceof Traversable);
Expected result:
----------------
bool(true)
bool(true)
Actual result:
--------------
bool(false)
Fatal error: Invalid opcode 138/1/1. in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39435&edit=1