Added a test php file and fixed a bug in the python file.