This is an old revision of the document!
PHP RFC: First Class Callables in constant expressions
- Version: 1.0
- Date: 2025-01-07
- Author: Tim Düsterhus (tim@tideways-gmbh.com), Volker Dusch (volker@tideways-gmbh.com)
- Status: Draft
- First Published at: http://wiki.php.net/rfc/fcc_in_const_expr
Introduction
The elevator pitch for the RFC. The first paragraph of this section will be slightly larger to give it emphasis; please write a good introduction.
Proposal
All the features and examples of the proposal.
To paraphrase Zeev Suraski, explain hows the proposal brings substantial value to be considered for inclusion in one of the world's most popular programming languages.
Remember that the RFC contents should be easily reusable in the PHP Documentation.
If applicable, you may wish to use the language specification as a reference.
Backward Incompatible Changes
What breaks, and what is the justification for it?
Proposed PHP Version(s)
Next 8.x (8.5).
RFC Impact
To SAPIs
None.
To Existing Extensions
None.
To Opcache
tbd
New Constants
None.
php.ini Defaults
None.
Open Issues
None.
Unaffected PHP Functionality
Only constant expression are affected by this change, but Closures could already appear within them.
Future Scope
None.
Proposed Voting Choices
Patches and Tests
Implementation
After the project is implemented, this section should contain
- the version(s) it was merged into
- a link to the git commit(s)
- a link to the PHP manual entry for the feature
- a link to the language specification section (if any)
References
Rejected Features
n/a