Bug #79942 [NEW]: b/c break: new\class now fails
| From: | sjon@php.net | Date: | Fri, 07 Aug 2020 11:15:12 +0000 |
| Subject: | Bug #79942 [NEW]: b/c break: new\class now fails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228444@lists.php.net to get a copy of this message | ||
From: sjon
Operating system: archLinux
PHP version: 8.0.0beta1
Package: Class/Object related
Bug Type: Bug
Bug description:b/c break: new\class now fails
Description:
------------
It's no longer to create an object from a specific namespace without a
trailing space after the 'new' keyword. This change is not documented as
b/c incompatible change in the NEWS or UPGRADING file. Somewhat
inconsistently,
new$x still works: https://3v4l.org/JSAFD
originally found as https://3v4l.org/ZMgiM
Test script:
---------------
<?php
class x {}
new\x;
Actual result:
--------------
Fatal error: Uncaught Error: Undefined constant "new\x" in /in/KsknY:4
--
Edit bug report at https://bugs.php.net/bug.php?id=79942&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79942&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79942&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79942&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79942&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79942&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79942&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79942&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79942&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79942&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79942&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79942&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79942&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79942&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79942&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79942&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79942&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79942&r=mysqlcfg