Skip to content

PHP-Parser 3.0.3

Choose a tag to compare

@nikic nikic released this 03 Feb 22:00
· 1033 commits to master since this release

Fixed

  • In "$foo[0]" the 0 is now parsed as an LNumber rather than String. (#325)
  • Ensure integers and floats are always pretty printed preserving semantics, even if the particular value can only be manually constructed.
  • Throw a LogicException when trying to pretty-print an Error node. Previously this resulted in an undefined method exception or fatal error.

Added

  • [PHP 7.1] Added support for negative interpolated offsets: "$foo[-1]"
  • Added preserveOriginalNames option to NameResolver. If this option is enabled, an originalName attribute, containing the unresolved name, will be added to each resolved name.
  • Added php-parse --with-positions option, which dumps nodes with position information.

Deprecated

  • The XML serializer has been deprecated. In particular, the classes Serializer\XML, Unserializer\XML, as well as the interfaces Serializer and Unserializer are deprecated.