Added function structure to php