|
Posted by Wayne on 11/16/05 02:21
On Tue, 15 Nov 2005 19:20:39 GMT, Oli Filth <catch@olifilth.co.uk>
wrote:
>Which is a shame, as it means that one can't differentiate between
>passing by reference to eliminate object copying, and passing by
>reference to allow alteration of the original object.
Since PHP uses copy-on-write semantics for all values there is no
object copying in PHP. Therefore there is no reason to references in
PHP unless you want to allow alteration of the original object. In
PHP, using references is actually more expensive than not using
references.
Navigation:
[Reply to this message]
|