rfc:closures

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:closures [2008/09/19 12:02] – Add example of using a lambda inline. rquadlingrfc:closures [2009/03/17 14:27] – Note $this isn't available any more scottmac
Line 3: Line 3:
   * Date: 2008-07-01   * Date: 2008-07-01
   * Author: Christian Seiler <chris_se@gmx.net>, Dmitry Stogov <dmitry@zend.com>   * Author: Christian Seiler <chris_se@gmx.net>, Dmitry Stogov <dmitry@zend.com>
-  * Status: Accepted+  * Status: Implemented
  
 This RFC discusses the introduction of compile-time lambda functions and closures in PHP. This RFC discusses the introduction of compile-time lambda functions and closures in PHP.
Line 172: Line 172:
  
 === Interaction with OOP === === Interaction with OOP ===
 +
 +$this support has been removed, see [[rfc/closures/removal-of-this|removal of this]]
  
 If a closure is defined inside an object, the closure has full access to the current object through $this (without the need to import it explicitly) and all private and protected methods of that class. This also applies to nested closures. Example: If a closure is defined inside an object, the closure has full access to the current object through $this (without the need to import it explicitly) and all private and protected methods of that class. This also applies to nested closures. Example:
rfc/closures.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1