Bug #80041 [Opn]: Multi-line namespace no longer works with PHP 8
| From: | w1djmartin at gmail dot com | Date: | Mon, 31 Aug 2020 18:20:59 +0000 |
| Subject: | Bug #80041 [Opn]: Multi-line namespace no longer works with PHP 8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-228825@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80041&edit=1
ID: 80041
User updated by: w1djmartin at gmail dot com
Reported by: w1djmartin at gmail dot com
Summary: Multi-line namespace no longer works with PHP 8
Status: Open
Type: Bug
Package: Class/Object related
Operating System: Windows 10
PHP Version: 8.0.0beta2
Block user comment: N
Private report: N
New Comment:
You can easily see how the result changes at https://3v4l.org/IWbe1
Previous Comments:
------------------------------------------------------------------------
[2020-08-31 18:16:57] w1djmartin at gmail dot com
Description:
------------
Prior to PHP 8 Beta 1 splitting a namespace across multiple lines would work without error. Starting
with PHP 8 Beta 1 a namespace that is split across multiple lines results in a parse error/syntax
error.
Test script:
---------------
namespace Foo
\Bar
\Baz;
echo __NAMESPACE__;
Expected result:
----------------
The test script should output: Foo\Bar\Baz
Actual result:
--------------
The test script throws an error: Parse error: syntax error, unexpected fully qualified name
"\Bar", expecting "{"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80041&edit=1