I am writing a code for GCM push notification. The code is working fine in local environment (Ubuntu 14.04 with xampp and Windows 8 with xampp) I am getting the push notifications too.
But when I deploy it in live server (Centos with lampp) I get syntax error
The code snippet which tiggers the syntax error is given below
private function getHeaders()
{
return [
'Authorization: key=' . $this->apiKey,
'Content-Type: application/json'
];
}
The live server error log is given below
[Fri Jan 22 08:28:49 2016] [error] [client 103.193.88.66] PHP Parse error: syntax error, unexpected '[' in /var/www/html/api.contribilling.com/include/Pusher.php on line 69
Line 69
=> return [
Any idea why this error? Is it because of some misconfiguration on the live server end?