Re: [RFC] Keep type of reference params

From: Date: Fri, 08 May 2020 13:31:52 +0000
Subject: Re: [RFC] Keep type of reference params
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-110086@lists.php.net to get a copy of this message
I think changing reference is a bad idea, even if it's behind some sort of declare or ini setting or what-have-you. I do support inout, which has similar high-level outcomes: the current value is fed in, and when the function returns it has a new value. I think we should use & at the call site, and we should also permit it optionally for by-ref parameters as it provides a migration path: first add & to all the call sites, then switch it to inout.

« previous php.internals (#110086) next »