Re: [RFC] Explicit call-site send-by-ref syntax

From: Date: Wed, 06 Dec 2017 20:08:13 +0000
Subject: Re: [RFC] Explicit call-site send-by-ref syntax
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-101255@lists.php.net to get a copy of this message
Am 06.12.2017 um 20:49 schrieb Nikita Popov:
I'd like propose optional support for explicitly marking by-reference argument passing at the call-site, in addition to the declaration-site:
     https://wiki.php.net/rfc/explicit_send_by_ref
In short, while currently we have
     function byRef(&$ref) {...}
     byRef($var);
this proposal would also allow
     function byRef(&$ref) {...}
     byRef(&$var);
so that the use of by-reference passing is obvious without having to consult the function declaration
IMHO a bad idea after "PHP Fatal error: Call-time pass-by-reference has been removed" not that long ago which was exactly the same syntax https://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available https://stackoverflow.com/questions/18046846/why-is-function-call-by-reference-in-php-deprecated

« previous php.internals (#101255) next »