Php bindings

Tested with and without ZTS on my development and testing copies, with ZTS on Travis-CI.