Re: Reference or copy?

From: Date: Wed, 23 Jul 2008 20:27:26 +0000
Subject: Re: Reference or copy?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-277208@lists.php.net to get a copy of this message
In both PHP 4 and PHP 5, this would be an internal reference: $a = $b; until $b is changed. The only exception is with Object handling under PHP 4, which had flawed reference handling. So, the rule remains -- don't use references for performance reasons -- use them if you need references. :-) ~Ted On 23-Jul-08, at 1:20 PM, Yeti wrote:
<?php # So if i want a copy in PHP, like: $a = $b; # In PHP5 $a would still be a reference as long as $b is not being changed?(!) # Such behaviour makes it extremely easy to write a speedy script without worrying about copy/reference issues! # Thanks to all of you, # Ernie ?> --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#277208) next »