fix php syntax error in functions