on Sep 18th, 2008PHP 5.3 and closures
<?php
function test() { return function() { echo "foo"; }; }
test()(); // fails
$func = test(); $func(); // works
<?php
function test() { return function() { echo "foo"; }; }
test()(); // fails
$func = test(); $func(); // works
My guess is that the parser can’t handle it, i.e. the PHP 5.3 grammar doesn’t account for this.
Ninh; Yeah, I even know why it’s just frekin’ annoying - was really looking forward to closures in 5.3