|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-06-22 02:16 UTC] reeze dot xia at gmail dot com
[2012-06-22 04:19 UTC] Daniel dot L dot Nill at gmail dot com
-Status: Open
+Status: Closed
[2012-06-22 04:19 UTC] Daniel dot L dot Nill at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 17:00:01 2025 UTC |
Description: ------------ There seems to be no reason for this throwing an error, but if I try to instantiate an anonymous function that does not have any arguments then I get an 'Parse error'. This breaks a lot of closure functionality that could exist. Test script: --------------- $anonymous_function = function(){ echo "hello world<br/>"; }; $anonymous_function(); $anonymous_function; Expected result: ---------------- hello world hello world Actual result: -------------- Parse error: syntax error, unexpected T_FUNCTION in /index.php(192) : eval()'d code on line 1