Doc #80003 [Ver->Csd]: The Type Operators page is not correct for the instanceof operator in 7.3+
| From: | phpdocbot@php.net | Date: | Thu, 20 Aug 2020 16:46:10 +0000 |
| Subject: | Doc #80003 [Ver->Csd]: 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-17806@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: phpdocbot@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: Verified
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=0241f6e074be177780a87f25bccd36e32018c503
Log: Fix #80003: The Type Operators page is not correct for the instanceof operator in 7.3+
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