I found a PHP library in which a line is:
$this->get_soap_provider_options()['location'];
But this is producing error:
Parse error: syntax error, unexpected '[' in ...path to file.. at line...
I could not understand why ['location']
is written after function argument get_soap_provider_options()
. It should be get_soap_provider_options('location')
or get_soap_provider_options(array('location'))
or something like this.
I think this line of code is for PHP 5.4 or higher. How can I write this line for an older version of PHP?