rfc:fcc_in_const_expr

This is an old revision of the document!


PHP RFC: First Class Callables in constant expressions

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

Support first class callables in constant expressions as proposed?
Real name Yes No
Final result: 0 0
This poll has been closed.

Patches and Tests

Implementation

After the project is implemented, this section should contain

  1. the version(s) it was merged into
  2. a link to the git commit(s)
  3. a link to the PHP manual entry for the feature
  4. a link to the language specification section (if any)

References

Rejected Features

n/a

rfc/fcc_in_const_expr.1736255974.txt.gz · Last modified: 2025/01/07 13:19 by timwolla