I have:
on my pc:wamp server (apache+php-5.4.3+mysql)
on my vps:nginx+php5-fpm+mysql(all latest in the ubuntu 64 bit server repository).
recently I have reinstalled the whole vps
my problem is,
statement like this:
function foo($arr){
return $arr;
}
foo(['foo1','foo2','foo3'])
works on my pc, and used to work on the server (same installation) but now it gives
an error such as:
Parse error: syntax error, unexpected '[' in /home/Websites/Domains/squazza/php/db.php
on line 261
(replacing the [ ] with Array( ) does fix the problem)
now I assume that this problem is related to php.ini so i am asking what setting could possibly be affecting this kind of behavior and why?
If you look at the documentation that short syntax is only avaible in php 5.4+ I suspect your php versions are different.
This list of new features in PHP5.4 maybe of some use to you.