What could be the reason this code doesn't work in PHP 5.6.23?
$change_text = [
"ok" => "Użytkownik zmieniony poprawnie.",
"new" => "Użytkownik dodany poprawnie.",
"delete" => "Użytkownik został usunięty.",
];
Works on my server with 5.6 and I've tested it on some other servers and it's fine. I moved a site to a new server and it has PHP 5.6.23 but this does't work...
Also the PHP documentation says:
As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].
The error i get:
Parse error: syntax error, unexpected '[' in /...
Any ideas?
Sure the problem is old version of php. I had the same problem. I ran simple script with phpinfo() from browser and saw, that version is 5.6, but problem was in cli. So I checked version in cli, and It was 5.3! Thats it. ))