small changes and test in php, c++