Yii 2 not working on 5.4.36


I have a server which I rent off a hosting provider. In my CPanel it states I am on PHP version 5.4.36

However Yii 2 is coming up with errors like …

[10-Feb-2015 21:04:42 Europe/London] PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/mutabl3/public_html/jamesbarnsley.com/showcase/neptune/web/index.php on line 12

Also it does not let me declare my arrays like the following …

$x = [];

I am forced to do it the old way like so …

$x = array();

Could it be that my PHP version number is not really 5.4.36, what do you think?

Try with

<?php phpinfo() ?>

to get php version on your server.

Yes it was the version that was the problem.

CPanel was showing a later version than the actual real version that was installed.