Skip to content

[PHP 8.6] Partial Function Application #9507

Description

@rarila

Description

Support for the upcoming version 8.6 of PHP.

(Scheduled to be released in late November 2026)

Use case/motivation

The PHP RFC: Partial Function Application (v2) introduces a native syntax to pre-fill some arguments of a function call while leaving others open for later.

The syntax uses a ? placeholder for a single open argument (e.g., str_replace('hello', 'hi', ?)) and ... for remaining variadic arguments, completely removing the need to write verbose, custom anonymous arrow functions.

Calling a function this way returns a standard Closure object that only expects the remaining missing arguments.

This feature drastically cleans up functional-style programming, making it highly readable when using inline callbacks or chaining operations with the pipe operator.

Related issues

No response

Are you willing to submit a pull request?

No

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PHP[ci] enable extra PHP tests (php/php.editor)kind:featureA feature requestneeds:triageRequires attention from one of the committers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions