Fixed php issues to pass tests