Php Declare Function Inside Function In Java