Parse error: syntax error, unexpected '[' in /home/vvamic/public_html/www.shopperz.biz/app/autoload.php on line 40
1 Answer
I'm guessing this is Magento 2 autoload (although you tagged both 1.9 and 2 and 2.1, so it's a guess). The newer versions of PHP allow arrays to be defined with a "shorthand" syntax of just square brackes: []
. On the last line of app/autoload.php
the bootstrapper populates the autoload stuff and an empty array is the second parameter:
\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);
This new syntax was introduced in PHP 5.4
As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].
I would check the version of PHP being utilized by your server. If it's 5.3, you will need to upgrade it.
autoload.php
.....