I'm using Slim Framework, and have set-up a very simple API to retrieve data from a database. This works flawlessly on my local machine, OS X El Capitan.
But - when moving the files to a shared hosting environment, all the routes throw 500 errors, with this error specifically:
Parse error: syntax error, unexpected '[' vendor/nikic/fast-route/src/functions.php on line 12
Line 12 is:
function simpleDispatcher(callable $routeDefinitionCallback, array $options = []) {
I can't work out why it is throwing a parse error on this line, and why it works on my local but not on shared, both running a version of PHP 5.5. Does anybody have any ideas on why this could be?