github nikic/PHP-Parser v2.0.1
PHP-Parser 2.0.1

latest releases: v4.19.1, v4.19.0, v5.0.2...
8 years ago

Fixed

  • declare() {} and declare(); are not semantically equivalent and will now result in different ASTs. The former case will have an empty stmts array, while the latter will set stmts to null.
  • Magic constants are now supported as semi-reserved keywords.
  • A shebang line like #!/usr/bin/env php is now allowed at the start of a namespaced file. Previously this generated an exception.
  • The prettyPrintFile() method will not strip a trailing ?> from the raw data that follows a __halt_compiler() statement.
  • The prettyPrintFile() method will not strip an opening <?php if the file starts with a comment followed by InlineHTML.

Don't miss a new PHP-Parser release

NewReleases is sending notifications on new releases.