Edit report at http://bugs.php.net/bug.php?id=53408&edit=1
ID: 53408 Updated by: j...@php.net Reported by: softwareelves+php at gmail dot com Summary: Calling a function returned from a function in one line -Status: Open +Status: Bogus Type: Feature/Change Request Package: Scripting Engine problem Operating System: Any PHP Version: 5.3.3 Block user comment: N Private report: N New Comment: And there are other requests for this already. Try search before spamming the bug database. Previous Comments: ------------------------------------------------------------------------ [2010-11-30 19:50:09] fel...@php.net There is a RFC for such. http://wiki.php.net/rfc/fcallfcall ------------------------------------------------------------------------ [2010-11-25 21:23:09] softwareelves+php at gmail dot com Description: ------------ Since we can now pass around function much easier, It would be beneficial to be able to "chain" together function calls. Test script: --------------- <?php function returnClosure() { return function() { print "helloworld"; }; } returnClosure()(); Expected result: ---------------- helloworld Actual result: -------------- Parse error: syntax error, unexpected '(' in test.php on line 9 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53408&edit=1