====== PHP RFC: Partial Function Application for instance of non-static methods ("$this") ======
* Version: 1.0
* Date: 2026-01-16
* Author: Tim Düsterhus (tim@tideways-gmbh.com), Arnaud Le Blanc (arnaud.lb@gmail.com)
* Status: Draft
* Implementation: https://github.com/...
===== Introduction =====
The elevator pitch for the RFC. The first paragraph of this section will be rendered slightly larger to give it emphasis.
Please write an introduction that helps people by providing concise context and include a representative small code snippet.
===== Proposal =====
All the features and examples of the proposal.
To [[http://news.php.net/php.internals/66051|paraphrase Zeev Suraski]], explain how the proposal brings substantial value to be considered for inclusion in one of the world's most popular programming languages.
Please clearly specify the desired syntax and semantics of your proposal, for example the interactions with existing PHP functionality, and please mention all edge cases, including potential gotchas.
Include stubs for newly introduced functions classes and constants, including namespaces and types.
==== Examples ====
Simple example:
===== Backward Incompatible Changes =====
None. The proposed syntax currently is a syntax error.
===== Proposed PHP Version(s) =====
Next PHP 8.x (8.6).
===== RFC Impact =====
==== To the Ecosystem ====
Partial Function Application itself is not yet released and it is unlikely that the ecosystem already adapted to it. Thus this additional proposal only has a small incremental impact, most notably by the new $this: named parameter which is “magic” in that it does not refer to an actual parameter name, contains the leading dollar-sign ($) and may appear at the start of the argument list before all positional parameters.
==== To Existing Extensions ====
None.
==== To SAPIs ====
None.
===== Open Issues =====
None.
===== Future Scope =====
None.
===== Voting Choices =====
Primary Vote requiring a 2/3 majority to accept the RFC:
* Yes
* No
* Abstain
===== Patches and Tests =====
Links to proof of concept PR.
If there is no patch, make it clear who will create a patch, or whether a volunteer to help with implementation is needed.
===== Implementation =====
After the RFC 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
===== References =====
* [[partial_function_application_v2|PHP RFC: Partial Function Application (v2)]]
===== Rejected Features =====
None.
===== Changelog =====
* 2026-01-16: Initial version.