Edit report at http://bugs.php.net/bug.php?id=48246&edit=1
ID: 48246 Updated by: [email protected] Reported by: mathieu dot suen at easyflirt dot com Summary: Allow the new statement to be a value. -Status: Open +Status: Duplicate Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: not relevant PHP Version: 5.2.9 Block user comment: N Private report: N New Comment: Duplicate of request #34502. Previous Comments: ------------------------------------------------------------------------ [2009-05-12 14:53:43] mathieu dot suen at easyflirt dot com Description: ------------ The new statement can only be use insid a assignement statement. ex: $a = new A(); It would be better to also allow it in other statement like the invokation: (new A())->foo() In other word "new A()" should be a valuable statement. Reproduce code: --------------- (new A())->foo() Expected result: ---------------- The method foo() is invoked on the newlly created object Actual result: -------------- Compilation error ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=48246&edit=1
