Christian Seiler wrote > > Hi Lukas, > > > Call for a vote. This time around people cannot claim to not have had > > time to review the issue. Also back then we tried to play it safe > > because of the short time before we were to release. This time there > is > > more time for this to mature if needed inside svn. > > Ok, so then I call for a vote. Again, here are the options: > > (0): No $this in closures, keep it that way. (keep PHP 5.3 behavior) > > (A): Original closures implementation: > $this is always the object context at > closure creation. No possibility to do > $someObject->closureProperty(...) and thus > no possibility to extend objects! > > (C): Javascript-like behaviour: Bind $this only when calling > the closure as object method, else $this is undefined. > > (D): JS-like behaviour on top of (A). > Please look at the RFC as to why I consider it to be a > *REALLY*, *REALLY* bad idea. > > (A+): (A) + Closure::bind & Closure->bindTo for rebinding > if this is wanted & the possibility to call a closure as an > object > method. (See last section of RFC for details) > > My vote: (A+) > > Regards, > Christian
FWIW, another non-internal-dev vote for (A+). Best Regards Mike Robinson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php