Doc #80003 [Opn->Ver]: The Type Operators page is not correct for the instanceof operator in 7.3+

From: Date: Thu, 20 Aug 2020 14:58:57 +0000
Subject: Doc #80003 [Opn->Ver]: The Type Operators page is not correct for the instanceof operator in 7.3+
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17805@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80003&edit=1 ID: 80003 Updated by: cmb@php.net Reported by: alastair at ioncube dot com Summary: The Type Operators page is not correct for the instanceof operator in 7.3+ -Status: Open +Status: Verified Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: cmb Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-08-20 13:50:58] alastair at ioncube dot com Description: ------------ In PHP 7.3 the instanceof operator was changed to allow literals to appear as the first argument. However, this is not reflected on the Type Operators page at https://www.php.net/manual/en/language.operators.type.php where it states that, "Constants, however, are not allowed." It then gives an example: var_dump(FALSE instanceof stdClass); The expected output for that is given as: PHP Fatal error: instanceof expects an object instance, constant given However, that is no longer true for PHP 7.3+ where the result will be bool(false). ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80003&edit=1

« previous php.doc.bugs (#17805) next »