fixed php support functions