Added PHP implementation. Work in progress.