Tuesday, November 17, 2009

foo()[0] doesn't work

<?

function foo () {
return new array(foo);
}

$arr = foo();
$arr[0](); // works
var_dump(foo()[0]); // compiling error

Doesn't work. Sucks.

No comments:

Post a Comment