rfc:closure_apply

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:closure_apply [2014/08/17 23:00]
ajf Corrected inaccuracy
rfc:closure_apply [2017/09/22 13:28] (current)
Line 1: Line 1:
 ====== PHP RFC: Closure::call ====== ====== PHP RFC: Closure::call ======
   * Version: 0.3   * Version: 0.3
-  * Date: 2014-07-29, put to internals 2014-08-03, latest 2014-08-17+  * Date: 2014-07-29, put to internals 2014-08-03, latest 2014-08-19
   * Author: Andrea Faulds, ajf@ajf.me   * Author: Andrea Faulds, ajf@ajf.me
-  * Status: Under Discussion+  * Status: Accepted
   * First Published at: http://wiki.php.net/rfc/closure_apply   * First Published at: http://wiki.php.net/rfc/closure_apply
  
Line 34: Line 34:
 class Foo { private $x = 3; } class Foo { private $x = 3; }
 $foo = new Foo; $foo = new Foo;
-$foobar = function () { var_dump($this->bar); };+$foobar = function () { var_dump($this->x); };
 $foobar->call($foo); // prints int(3) $foobar->call($foo); // prints int(3)
 </code> </code>
Line 95: Line 95:
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
  
-This is proposed for the next version of PHP, either the next 5.x or PHP NEXT, whichever comes sooner. The patch is based on master, intended for the next 5.x.+This is proposed for the next version of PHP, either the next 5.x or PHP NEXT, whichever comes sooner. The patch is based on master, intended for PHP 7.
  
 ===== Future Scope ===== ===== Future Scope =====
Line 106: Line 106:
  
 Voting started 2014-08-17 but was cancelled the same day due to the removal of unbound scoped closures. Voting started 2014-08-17 but was cancelled the same day due to the removal of unbound scoped closures.
 +
 +Voting started again on 2014-08-20 and ended 2014-08-27.
 +
 +<doodle title="Closure::apply() (Approve RFC and merge into master?)" auth="ajf" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
Line 115: Line 122:
 ===== References ===== ===== References =====
  
-  * As previously mentioned, my [[rfc:function_referencing|Function Referencing as Closures]] RFC has this RFC as a prerequisite+  * My [[rfc:function_referencing|Function Referencing as Closures]] RFC has this RFC as a prerequisite
  
 ===== Changelog ===== ===== Changelog =====
rfc/closure_apply.1408316430.txt.gz · Last modified: 2017/09/22 13:28 (external edit)