ID: 46056
Updated by: [EMAIL PROTECTED]
Reported By: odakynn at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Windows XP
PHP Version: 5.3.0alpha2
New Comment:
That is expected, func()() cannot be used.
Previous Comments:
------------------------------------------------------------------------
[2008-09-11 15:57:54] odakynn at gmail dot com
Description:
------------
I was trying to call a function returned by another function and it
caused a parse error.
Reproduce code:
---------------
function a() {
echo 'a';
return create_function('', 'echo \'b\';');
};
a()();
- OR -
function a() {
echo 'a';
return function() { echo 'b'; };
};
a()();
Expected result:
----------------
ab
Actual result:
--------------
Parse error: syntax error, unexpected '(' in ...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46056&edit=1