Skip to content

Commit

Permalink
Document that namespaced names containing whitespace are not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Apr 25, 2021
1 parent 4848a0d commit 37ac4ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doc/0_Introduction.markdown
Original file line number Diff line number Diff line change
@@ -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?
-----------------
Expand All @@ -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.
Expand Down

0 comments on commit 37ac4ea

Please sign in to comment.