1
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.

4

2 に答える 2

3

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.

于 2012-08-07T12:06:01.550 に答える
1

試してみてください:

array_walk ($this->something, array($this, 'function_name'), $part_something);

これを見てくださいhttp://it2.php.net/manual/en/function.array-walk.php

于 2012-08-07T12:09:58.223 に答える