rfc:fcc_in_const_expr

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
rfc:fcc_in_const_expr [2025/01/07 14:15] timwollarfc:fcc_in_const_expr [2025/01/22 14:31] (current) – Set to under discussion edorian
Line 3: Line 3:
   * Date: 2025-01-07   * Date: 2025-01-07
   * Author: Tim Düsterhus (tim@tideways-gmbh.com), Volker Dusch (volker@tideways-gmbh.com)   * Author: Tim Düsterhus (tim@tideways-gmbh.com), Volker Dusch (volker@tideways-gmbh.com)
-  * Status: Draft+  * Status: Under Discussion
   * First Published at: http://wiki.php.net/rfc/fcc_in_const_expr   * First Published at: http://wiki.php.net/rfc/fcc_in_const_expr
  
Line 29: Line 29:
 ==== Scoping ==== ==== Scoping ====
  
-As with other constant-expressions, FCC defined in constant expressions follow the expected scoping rules of the context they are placed in+As with other constant-expressions, FCC defined in constant expressions follow the expected scoping rules of the context they are placed in. This means that FCC in property default values //may// reference <php>private</php> methods of the class where they are defined, similarly to how a FCC defined in the constructor and stored in a property may access those <php>private</php> methods. Likewise are FCC in attribute parameters allowed to access <php>private</php> methods of the surrounding class.
-All the features and examples of the proposal. This means that FCC in property default values //may// reference <php>private</php> methods of the class where they are defined, similarly to how a FCC defined in the constructor and stored in a property may access those <php>private</php> methods. Likewise are FCC in attribute parameters allowed to access <php>private</php> methods of the surrounding class.+
  
 ==== Examples ==== ==== Examples ====
Line 84: Line 83:
 ==== To Opcache ==== ==== To Opcache ====
  
-tbd+The current implementation uses a special AST structure to cache the resolved function for consistent behavior of the global function fallback. To correctly cache this AST structure, Opcache changes are required. The PR passes all tests both with and without JIT enabled.
  
 ==== New Constants ==== ==== New Constants ====
rfc/fcc_in_const_expr.1736259312.txt.gz · Last modified: 2025/01/07 14:15 by timwolla