Version 5 support

Well, that did not seem very hard. There where some minor problems with the new features in version 5, but as of revision 63 the files from the distribution of PHP 5 are also parsed correctly. There are no ambiguities and the SDF passes almost 500 unit-tests. If you find anything that should be parsed and fails with the SDF, please let me know.

For the people that are interested, a (short?) list of differences between version 4 and 5, it lists what the version has in contrary to the other version. This only includes the syntactic differences, not the semantic differences.
  • Version 4 has old_function support
  • Version 5 can use results from function as if it was an object
  • Version 5 has __METHOD__ as magic constant
  • Version 5 can access class constants with '::'
  • Version 5 has 'clone' and 'instanceof'
  • Version 5 support references within for each-variables
  • Version 5 has support for final and abstract classes
  • Version 5 has interface support
  • Version 5 has support different types of functions within classes (e.g. private,public,etc)
  • Version 5 has constant class variables
  • Version 5 has try-catch and throw supports (no 'throws' for functions though)
  • Version 5 has type hinting for functions

No comments: