Possible Duplicate:
Workaround for basic syntax not being parsed
Why don't PHP attributes allow functions?
I'm getting
Parse error: syntax error, unexpected T_FUNCTION in /home/codemonkey/dev/broadnet/bito.api2/broadnet/resources/broadmapresource.php on line 87
From this code:
private $debugFunctions = array(
"testing" => function() // Line 87
{
return "I'm a test function!";
},
"foo" => function()
{
return "bar";
}
);
I was under the impression I could use anonymous PHP functions anywhere I could use $variables
. Is this an exception, or am I doing something wrong?
I'm using PHP 5.3.9