From 37ac4ea9c20ffd121ea63b7a4532ad730305f11c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 25 Apr 2021 22:47:15 +0200 Subject: [PATCH] Document that namespaced names containing whitespace are not supported --- doc/0_Introduction.markdown | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/0_Introduction.markdown b/doc/0_Introduction.markdown index 433cf10..b300e73 100644 --- a/doc/0_Introduction.markdown +++ b/doc/0_Introduction.markdown @@ -1,7 +1,7 @@ Introduction ============ -This project is a PHP 5.2 to PHP 7.4 parser **written in PHP itself**. +This project is a PHP 5.2 to PHP 8.0 parser **written in PHP itself**. What is this for? ----------------- @@ -26,7 +26,11 @@ programmatic PHP code analysis are incidentally PHP developers, not C developers What can it parse? ------------------ -The parser supports parsing PHP 5.2-7.4. +The parser supports parsing PHP 5.2-8.0, with the following exceptions: + + * Namespaced names containing whitespace (e.g. `Foo \ Bar` instead of `Foo\Bar`) are not supported. + These are illegal in PHP 8, but are legal in earlier version. However, PHP-Parser does not + support them for any version. As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP version it runs on), additionally a wrapper for emulating tokens from newer versions is provided.