Php Declare Function Inside Function Javascript W3schools