Req #81241 [NEW]: quoted strings should support "{$this::constant}"

From: Date: Fri, 09 Jul 2021 13:10:40 +0000
Subject: Req #81241 [NEW]: quoted strings should support "{$this::constant}"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234934@lists.php.net to get a copy of this message
From: divinity76 at gmail dot com Operating system: PHP version: Next Minor Version Package: Scripting Engine problem Bug Type: Feature/Change Request Bug description:quoted strings should support "{$this::constant}" Description: ------------ the same way "{$this->foo}" and $this->foo and this::CONSTANT is legal, "{$this::CONSTANT}" should also be legal Test script: --------------- <?php class C{ const CON=456; function f(){ echo "123{$this::CON}"; } } (new C())->f(); Expected result: ---------------- 123456 Actual result: -------------- Parse error: syntax error, unexpected token "}", expecting "->" or "?->" or "{" or "[" in /in/PIN5O on line 5 -- Edit bug report at https://bugs.php.net/bug.php?id=81241&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81241&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81241&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81241&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81241&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81241&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81241&r=support Expected behavior: https://bugs.php.net/fix.php?id=81241&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81241&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81241&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81241&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81241&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81241&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81241&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81241&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81241&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81241&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81241&r=mysqlcfg

« previous php.bugs (#234934) next »