Bug #80598 [NEW]: Instanceof does not evaluate expressions in second operand

From: Date: Wed, 06 Jan 2021 12:45:23 +0000
Subject: Bug #80598 [NEW]: Instanceof does not evaluate expressions in second operand
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231393@lists.php.net to get a copy of this message
From: hello at rapliandras dot hu Operating system: Ubuntu 20 PHP version: 7.4.13 Package: Compile Failure Bug Type: Bug Bug description:Instanceof does not evaluate expressions in second operand Description: ------------ Trying the following expression: $entity instanceof (static::BASE_CLASS) I get PHP Parse error: syntax error, unexpected '(' Test script: --------------- $entity instanceof (static::BASE_CLASS) Expected result: ---------------- Even if this is on purpose, or documented, it's not the expected, intuitive behavior. instanceof operator should have no problems with evaluating the right operand Actual result: -------------- PHP Parse error: syntax error, unexpected '(' -- Edit bug report at https://bugs.php.net/bug.php?id=80598&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80598&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80598&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80598&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80598&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80598&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80598&r=support Expected behavior: https://bugs.php.net/fix.php?id=80598&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80598&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80598&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80598&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80598&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80598&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80598&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80598&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80598&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80598&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80598&r=mysqlcfg

« previous php.bugs (#231393) next »