Is there a function to make a copy of a PHP array to another?
In PHP arrays are assigned by copy, while objects are assigned by reference. This means that: Will yield: Whereas: Yields: You could get confused by intricacies such as ArrayObject, which is an object that acts exactly like an array. Being an object however, it has reference semantics. Edit: @AndrewLarsson raises a point in the comments … Read more