This question already has an answer here:
Parse error: syntax error, unexpected '[' in path/TwitterOAuth.php on line 129
public function oauth($path, array $parameters = [])
Guys! What this? Its really fix?
</div>
This question already has an answer here:
Parse error: syntax error, unexpected '[' in path/TwitterOAuth.php on line 129
public function oauth($path, array $parameters = [])
Guys! What this? Its really fix?
</div>
You are using a PHP version that is way too old for anything, these days.
Defining arrays with []
is only supported from PHP 5.4 as mentioned on this page:
As of PHP 5.4 you can also use the short array syntax, which replaces array() with [].
<?php
$array = array(
"foo" => "bar",
"bar" => "foo",
);
// as of PHP 5.4
$array = [
"foo" => "bar",
"bar" => "foo",
];
?>