- added a PHP implementation
- fixed a typo in the Python doc