summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-06-15 11:50:55 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-07-22 12:36:05 +0200
commit7a3dcc3e339cde2177ba4fe8fc45f78c94dfbb29 (patch)
tree7750f94dceba15437e3dad497734d3b1d65b4e4b /Zend/zend_compile.c
parentacbf7802af7b88d16497971494f5dc42c4e08ce6 (diff)
downloadphp-git-7a3dcc3e339cde2177ba4fe8fc45f78c94dfbb29.tar.gz
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.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index aafe582f9f..d555297c17 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -7432,7 +7432,7 @@ void zend_compile_namespace(zend_ast *ast) /* {{{ */
if (name_ast) {
name = zend_ast_get_str(name_ast);
- if (ZEND_FETCH_CLASS_DEFAULT != zend_get_class_fetch_type(name)) {
+ if (zend_string_equals_literal_ci(name, "namespace")) {
zend_error_noreturn(E_COMPILE_ERROR, "Cannot use '%s' as namespace name", ZSTR_VAL(name));
}