php-src/Zend/tests/namespace_name_namespace_start.phpt
Nikita Popov 7a3dcc3e33 Treat namespaced names as single token
Namespace names are now lexed as single tokens of type
T_NAME_QUALIFIED, T_NAME_FULLY_QUALIFIED or T_NAME_RELATIVE.

RFC: https://wiki.php.net/rfc/namespaced_names_as_token

Closes GH-5827.
2020-07-22 12:36:05 +02:00

11 lines
261 B
PHP

--TEST--
Cannot use "namespace\xyz" as namespace name, due to conflict with ns-relative names
--FILE--
<?php
namespace NAMEspace\xyz;
?>
--EXPECTF--
Parse error: syntax error, unexpected namespace-relative name "NAMEspace\xyz", expecting "{" in %s on line %d