coverted to php