origin: http://code.google.com/p/phamlp/. The author didn't reply to my mail. (yet?). Unless that happens my changes to phamlp can be found here. Much more fixes have been contributed by: https://github.com/goncaloesteves/phamlp