My script is working really fine on my xampp php version 5.6. Now I tried to upload it on the server php version 5.3.3 , it says
PHP Parse error: syntax error, unexpected '['
The line which its mocking about is this one:
$this->pending_nodes[$number] = [];
The whole code block looks like this:
public function addPendingNode(ProtocolNode $node){
$from = $node->getAttribute("from");
if(strpos($from,Constants::WHATSAPP_SERVER) !== false)
$number = ExtractNumber($node->getAttribute("from"));
else
$number = ExtractNumber($node->getAttribute("participant"));
if(!isset($this->pending_nodes[$number]))
$this->pending_nodes[$number] = [];
$this->pending_nodes[$number][] = $node;
}
I am thankful for any help, I cannot seach [ with google and have no idea where it could come from, since on xampp its working fine.