From: Operating system: Fedora 12, 2.6.32.11-99 PHP version: 5.3.2 Package: *General Issues Bug Type: Bug Bug description:more closures on script fail
Description: ------------ I'm not able to use more closures on single script. Closures - assigned to variable or used as anonymous are null, instead of instance of Closure class. Also it is really curious, sometimes it works, if there is more code before closure creation. Fedora 12: 2.6.32.12-115.fc12.x86_64 Test script: --------------- // * * * * * * * * * * closure 1 echo 'closure 1'; var_dump(function($arg1) { return intval($arg1) * 2; }); // * * * * * * * * * * closure 2 echo 'closure 2'; $c2 = function() { echo time(); }; var_dump($c2); // * * * * * * * * * * closure 3 echo 'closure 3'; var_dump(function() { return sha1(strval(rand())); }); Expected result: ---------------- closure 1 object(Closure)[1] closure 2 object(Closure)[2] closure 3 object(Closure)[3] Actual result: -------------- closure 1 null closure 2 null closure 3 object(Closure)[1] -- Edit bug report at http://bugs.php.net/bug.php?id=52068&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52068&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52068&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52068&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52068&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52068&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52068&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52068&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52068&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52068&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52068&r=support Expected behavior: http://bugs.php.net/fix.php?id=52068&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52068&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52068&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52068&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52068&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52068&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52068&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52068&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52068&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52068&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52068&r=mysqlcfg