1) When an array is passed as an argument to a method or function, is it passed by reference, or by value?

2) When assigning an array to a variable, is the new variable a reference to the original array, or is it new copy?
What about doing this:

$a = array(1,2,3);
$b = $a;

Is $b a reference to $a?

8 Answers
8

Leave a Reply

Your email address will not be published. Required fields are marked *