rfc:function_referencing
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:function_referencing [2014/08/03 14:58] – fixed link ajf | rfc:function_referencing [2014/08/04 22:55] – Clarity for Danack :) ajf | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2014-08-03 | * Date: 2014-08-03 | ||
* Author: Andrea Faulds, ajf@ajf.me | * Author: Andrea Faulds, ajf@ajf.me | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 43: | Line 43: | ||
$qux = new FooBar(3); | $qux = new FooBar(3); | ||
+ | // Static functions referenced retain their scope | ||
$func = & | $func = & | ||
+ | // Thus it can see the instance variables of $qux | ||
$func($qux); | $func($qux); | ||
$func = & | $func = & | ||
$func-> | $func-> | ||
+ | |||
+ | // Or, if we wish to bind | ||
+ | $func = Closure:: | ||
</ | </ | ||
Line 90: | Line 95: | ||
A branch which implements this with a test which incorporates the Closure:: | A branch which implements this with a test which incorporates the Closure:: | ||
- | |||
- | ===== Implementation ===== | ||
- | After the project is implemented, | ||
- | - the version(s) it was merged to | ||
- | - a link to the git commit(s) | ||
- | - a link to the PHP manual entry for the feature | ||
===== References ===== | ===== References ===== | ||
Line 101: | Line 100: | ||
* [[https:// | * [[https:// | ||
* [[rfc: | * [[rfc: | ||
- | |||
- | ===== Rejected Features ===== | ||
- | Keep this updated with features that were discussed on the mail lists. |
rfc/function_referencing.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1