Hi internals,

I'd like to start the discussion on the "explicit call-site
pass-by-reference" RFC again:
https://wiki.php.net/rfc/explicit_send_by_ref

The RFC proposes to allow using a "&" marker at the call-site (in addition
to the declaration-site) when by-reference passing is used.

Relative to the last time this was discussed, there are three main changes
to the proposal:

1. The RFC proposes a mode in which the use of & at the call-site is
required. This depends on the outcome of the "language evolution" RFC. It
uses a declare as a placeholder, but if we go with editions, then the mode
would be enabled in the next edition instead. (If we go with none of the
options, then this part of the RFC becomes void.)

2. The RFC now also tackles a long-standing problem in the handling of
__call/__callStatic and call_user_func. The explicit call-site annotation
allows us to use these features together with by-reference arguments. I
failed to realize that the RFC can nicely solve this problem when
originally proposing it.

3. The RFC now discusses the old "call-time pass-by-reference" feature in
more detail, and how this RFC differs from it. The important difference is
that this RFC requires the marker at both call *and* declaration.

Regards,
Nikita

Reply via email to