PHP Version 5.2.14 / Parse error: syntax error, unexpected T_FUNCTION, expecting ‘)’

Your code uses anonymous functions which were supported in PHP 5.3. So, you need PHP 5.3 to get it to working. Upgrade your server’s PHP installation.

Anonymous functions, also known as closures, allow the creation of functions which have no specified name.

Leave a Comment