|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-02-21 07:23 UTC] gern_ at hotmail dot com
Description:
------------
When calling error_reporting() before any lambda function will cause a
Fatal Error.
Putting error_reporting() in a separate file "fix" this bug.
Reproduce code:
---------------
error_reporting(E_ALL); // uncomment this line to work
$lambda = function() { print 'Hello World'; };
$lambda();
// calling error_reporting(E_ALL) at this point will not cause Fatal Error
Expected result:
----------------
Hello World
Actual result:
--------------
Fatal error: Function name must be a string in D:\www\lambda.php on line
6
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 13:00:01 2025 UTC |
I'm having similar issue on the same OS & PHP version. $lambda = function() { print 'Hello World'; }; $lambda(); $array['test'] = 2; // this trigger a Fatal Error