Hi
as part of the design for a “PFA for $this” RFC, Arnaud and I came
across one issue in the original design of PFA that makes it hard to do
the “PFA for $this” follow-up in a way that does not violate user
expectations. Specifically the handling of “optional parameters”. With
the support of Larry as one of the original authors of the PFA RFC, we
would like to propose an amendment to the PFA RFC that is unlikely to
affect real-world use-cases, but that will enable these follow-ups and
that will result in a more predictable behavior overall.
Please find all details in the RFC at:
https://wiki.php.net/rfc/partial_function_application_optional_placeholder
Unless significant discussion happens, I expect the RFC to go to vote in
2 weeks, so that it can be incorporated in the PFA implementation right
away.
Best regards
Tim Düsterhus