array_walk ($this->something, [$this, 'function_name'], $part_something);
Parse error: syntax error, unexpected '[' in /.../...php on line 67
This works on my local test environment, but not on the server.
array_walk ($this->something, [$this, 'function_name'], $part_something);
Parse error: syntax error, unexpected '[' in /.../...php on line 67
This works on my local test environment, but not on the server.
Are you running PHP 5.4 in production? If not the bracket syntax is not a valid way to represent an array in PHP 5.3 and below as it is a new feature in 5.4.
試してみてください:
array_walk ($this->something, array($this, 'function_name'), $part_something);
これを見てくださいhttp://it2.php.net/manual/en/function.array-walk.php