Parse error: syntax error, unexpected '[' I am having a syntax error on my craftCMS website. Hoping someone could help me. 


  Parse error: syntax error, unexpected '[' in /home16/puresoci/public_html/dev/craft/plugins/charge/ChargePlugin.php on line 14


Here's the line that it is referring to

  craft()-&gt;templates-&gt;hook('charge.prepCpTemplate', [$this, 'prepCpTemplate']);


Here's the whole function 

public function init()
{
    craft()-&gt;charge_license-&gt;ping();

    if (craft()-&gt;request-&gt;isCpRequest()) {
        $this-&gt;includeCpResources();
        craft()-&gt;templates-&gt;hook('charge.prepCpTemplate', [$this, 'prepCpTemplate']);
        craft()-&gt;templates-&gt;hook('charge.prepCpSettingsTemplate', [$this, 'prepCpSettingsTemplate']);
    }
}


But I am a beginner on using PHP and I dont know how should I update this. I am using PHP 5.6 right now.
The Charge plugin requires a minimum of PHP 5.4.

The brackets notation for arrays (which is what Charge uses) was added in 5.4.


  http://php.net/manual/en/language.types.array.php


Contact your hosting provider to find out how to upgrade.