Re: References in rfc:propertygetsetsyntax
On 1/21/2013 12:36 PM, Richard Quadling wrote:
Documented in the references section:
https://wiki.php.net/rfc/propertygetsetsyntax-v1.2?&#references
Normally, a function definition dictates this.
But if $value is already passed, a reference to it (&$value) is not
going to be referencing the external variable surely?
Whilst objects are always passed by reference (I assume this is still
the case for this rfc and I can see no reason why it isn't), and I
think I can see the sort of issues that setting an accessor to a
reference (binding the value of a property in this class to something
external to the class - yeah - just eek!), is this an issue?
Will users _want_ ...
set(&$value){ $this->externally_linked_var = $value; }
I'm not expecting any changes to anything, just looking for clarification.
Regards,
Richard.
--
-Clint
Thread (3 messages)