rfc:closures:removal-of-this
Differences
This shows you the differences between two versions of the page.
Next revisionBoth sides next revision | |||
rfc:closures:removal-of-this [2009/01/26 12:27] – created cseiler | rfc:closures:removal-of-this [2009/01/26 22:25] – added tidbits on reflection cseiler | ||
---|---|---|---|
Line 47: | Line 47: | ||
===== Reflection ===== | ===== Reflection ===== | ||
- | TBD. | + | Reflection was changed a bit in order to make sure Non-OOP-Closures are supported consistently. |
+ | |||
+ | ==== getClosure() / getClosureThis() removal ==== | ||
+ | |||
+ | **Removed** '' | ||
+ | |||
+ | Since allowing that for this special case would perhaps inhibit the possibility of later adding JS-like $this binding to closures at all, it is best to simply remove the method and perhaps later re-add it when the type of implementation is clear. | ||
+ | |||
+ | ==== Modified ReflectionFunction / ReflectionMethod dynamic ==== | ||
+ | |||
+ | In the original RFC, ReflectionMethod also accepted solely $closure as a parameter to the constructor and implied '' | ||
+ | |||
+ | This is now consolidated: | ||
+ | |||
+ | - ReflectionFunction now accepts $closure as sole parameter | ||
+ | - ReflectionMethod now does not automatically infer '' | ||
+ | |||
+ | Thus, a '' | ||
+ | |||
+ | ==== isClosure ==== | ||
+ | |||
+ | isClosure now detects a closure according to the flags (fn_flags & ZEND_ACC_CLOSURE). |
rfc/closures/removal-of-this.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1