note 47299 rejected from language.variables by sean
| From: | sean@php.net | Date: | Wed, 10 Nov 2004 17:05:07 +0000 |
| Subject: | note 47299 rejected from language.variables by sean | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-80360@lists.php.net to get a copy of this message | ||
Note Submitter: dvogel at ssc dot wisc dot edu
----
The following example would copy the array twice; once from $a to $b and once from $b to $c.
$a = array(0, 1, 2);
$b = $a;
$c = $b;
This would return a copy of the array defined in function f().
function f() {
return array(0, 1, 2);
}
$a = f();
Does that mean that this would copy the array twice, once in f() and once in g()?
function f() {
return array(0, 1, 2);
}
function g() {
return f();
}
$a = g();