Php parser

This is a work-in-progress towards fixing #195. Commits are still a bit messy, tests are still failing, code isn't completely cleaned up, but hopefully it can serve for some preliminary review or discussion. You have been warned ;-)
How did you decide between using git submodules and a package manager like Composer?