I am a PHP developer and I wouldn’t have posted this question here if only this error shows up on ALL machines I tested it with.
I currently get this error:
PHP Parse error: syntax error, unexpected T_FUNCTION in api.php on line 51
I have here the exact copy of api.php and I tell you that I can’t see any error in the code
In fact, the same code runs in my local development machine (PHP 5.3) but it still fails on the production machine (PHP 5.2.17)
Any ideas what am I missing here?
You are using anonymous function at line 51, which is only supported by php 5.3+, the exact reason why it works on your dev machine with php5.3 and not on ze production with 5.2
http://php.net/manual/en/functions.anonymous.php