|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-05-20 17:36 UTC] dan dot lugg at gmail dot com
[2012-05-20 17:38 UTC] felipe@php.net
-Type: Bug
+Type: Feature/Change Request
[2015-01-10 22:56 UTC] requinix@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: requinix
[2015-01-10 22:56 UTC] requinix@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 07:00:01 2025 UTC |
Description: ------------ When you "instantiate" a closure through the function(){} syntax, you cannot chain the closure method bindTo() from the instantiation. While this is trivial, considering static Closure::bind(), it seems inconsistent with efforts to allow method invocation on instantiation of other objects. Test script: --------------- $function = (function(){ /* ... */ })->bindTo($object); Expected result: ---------------- $function should contain the instantiated and re-bound closure. Actual result: -------------- Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR)