ParseError thrown

syntax error, unexpected 'function' (T_FUNCTION), expecting '('