What does this mean \"In other words, the reference behavior of arrays is defined in an element-by-element basis; the reference behavior of individual elements is dissociate
I think if you use some ASCII art you might understand it better:
//Line 01
$a = 1;
----------
┌──────┐ ┌─────┐
│ $a │ ─────────────────> │ 1 │
└──────┘ └─────┘
//Line 02
$b = &$a;
----------
┌──────┐ ┌─────┐
│ $a │ ─────────────────> │ 1 │
└──────┘ └─────┘
^
┌──────┐ │
│ $b │ ───────────────────────┘
└──────┘
//Line 03
$c = $b;
----------
┌──────┐ ┌─────┐
│ $a │ ─────────────────> │ 1 │
└──────┘ └─────┘
^
┌──────┐ │
│ $b │ ───────────────────────┘
└──────┘
┌──────┐ ┌─────┐
│ $c │ ─────────────────> │ 1 │
└──────┘ └─────┘
//Line 04
$c = 7;
----------
┌──────┐ ┌─────┐
│ $a │ ─────────────────> │ 1 │
└──────┘ └─────┘
^
┌──────┐ │
│ $b │ ───────────────────────┘
└──────┘
┌──────┐ ┌─────┐
│ $c │ ─────────────────> │ 7 │
└──────┘ └─────┘
Now as you can see when you assign a variable by reference and you change it, it will also change the value for the other variable. Here for example $a and $b, if you assign 5 to $b, $a will also point to 5, vice versa.
But you didn't assigned $b to $c by reference (you made a normal by value assignment), so if you change the value of $c it won't change the value of $b (, or $a).
//Line 01
$arr = array(1);
----------
┌───────────┐ ┌─────┐
│ $arr[0] │ ─────────────────> │ 1 │
└───────────┘ └─────┘
//Line 02
$a = &$arr[0];
----------
┌───────────┐ ┌─────┐
│ $arr[0] │ ─────────────────> │ 1 │
└───────────┘ └─────┘
^
┌──────┐ │
│ $a │ ────────────────────────────┘
└──────┘
//Line 03
$arr2 = $arr;
----------
┌───────────┐ ┌─────┐
│ $arr[0] │ ─────────────────> │ 1 │
└───────────┘ └─────┘
^
┌──────┐ │
│ $a │ ────────────────────────────┤
└──────┘ │
│
┌────────────┐ │
│ $arr2[0] │ ──────────────────────┘
└────────────┘
//Line 04
$arr2[0]++;
----------
┌───────────┐ ┌─────┐
│ $arr[0] │ ─────────────────> │ 2 │
└───────────┘ └─────┘
^
┌──────┐ │
│ $a │ ────────────────────────────┤
└──────┘ │
│
┌────────────┐ │
│ $arr2[0] │ ──────────────────────┘
└────────────┘
Now here comes the line what the manual is trying to explain:
$arr2 = $arr;
Even though you don't assign the array $arr by reference to $arr2, the array still holds an element which points to a reference! And that reference will still be in $arr2, so the first element of the second array also points to the reference as $arr[0] and $a does.
Maybe if you see the difference when an array is assigned by reference and when an array holds an element with a reference you understand it better:
//Line 01
$arr1 = [1, 1, 1];
----------
┌─────────┐
│ $arr1 │
└─────────┘
│
│
└─────────> ┌────────────┐
│ Array │ ┌─────┐
│ container: │ ┌───> │ 1 │
├────────────┤ │ └─────┘
│ [0] │ ───┘
├────────────┤ ┌─────┐
│ [1] │ ───────> │ 1 │
├────────────┤ └─────┘
│ [2] │ ───┐
└────────────┘ │ ┌─────┐
└───> │ 1 │
└─────┘
//Line 02
$arr2 = &$arr1;
----------
┌─────────┐
│ $arr1 │
└─────────┘
│
│
└─────────> ┌────────────┐
│ Array │ ┌─────┐
│ container: │ ┌───> │ 1 │
├────────────┤ │ └─────┘
│ [0] │ ───┘
├────────────┤ ┌─────┐
│ [1] │ ───────> │ 1 │
├────────────┤ └─────┘
│ [2] │ ───┐
┌─────────> └────────────┘ │ ┌─────┐
│ └───> │ 1 │
│ └─────┘
┌─────────┐
│ $arr2 │
└─────────┘
//Line 03 & 04
$arr2[0] = 2;
$arr2[1] = 2;
----------
┌─────────┐
│ $arr1 │
└─────────┘
│
│
└─────────> ┌────────────┐
│ Array │ ┌─────┐
│ container: │ ┌───> │ 2 │
├────────────┤ │ └─────┘
│ [0] │ ───┘
├────────────┤ ┌─────┐
│ [1] │ ───────> │ 2 │
├────────────┤ └─────┘
│ [2] │ ───┐
┌─────────> └────────────┘ │ ┌─────┐
│ └───> │ 1 │
│ └─────┘
┌─────────┐
│ $arr2 │
└─────────┘
So as you can see here, since you assigned $arr1 to $arr2 by reference they both point to the same array.
//Line 01
$a = 1;
----------
┌──────┐ ┌─────┐
│ $a │ ─────────────────> │ 1 │
└──────┘ └─────┘
//Line 02
$arr3 = [&$a, 1, 1];
----------
┌──────┐ ┌─────┐
│ $a │ ──────────────────> │ 1 │
└──────┘ └─────┘
^
┌─────────┐ │
│ $arr3 │ │
└─────────┘ │
│ │
│ │
└─────────> ┌────────────┐ │
│ Array │ │
│ container: │ │
├────────────┤ │
│ [0] │ ───┘
├────────────┤ ┌─────┐
│ [1] │ ───────> │ 1 │
├────────────┤ └─────┘
│ [2] │ ───┐
└────────────┘ │ ┌─────┐
└───> │ 1 │
└─────┘
//Line 03
$arr4 = $arr3;
----------
┌──────┐ ┌─────┐
│ $a │ ──────────────────> │ 1 │ <─────────┐
└──────┘ └─────┘ │
^ │
┌─────────┐ │ │
│ $arr3 │ │ │
└─────────┘ │ │
│ │ │
│ │ │
└─────────> ┌────────────┐ │ │
│ Array │ │ │
│ container: │ │ │
├────────────┤ │ │
│ [0] │ ───┘ │
├────────────┤ ┌─────┐ │
│ [1] │ ───────> │ 1 │ │
├────────────┤ └─────┘ │
│ [2] │ ───┐ │
└────────────┘ │ ┌─────┐ │
└───> │ 1 │ │
└─────┘ │
│
┌─────────┐ │
│ $arr4 │ │
└─────────┘ │
│ │
│ │
└─────────> ┌────────────┐ │
│ Array │ │
│ container: │ │
├────────────┤ │
│ [0] │ ──────────────────┘
├────────────┤ ┌─────┐
│ [1] │ ───────> │ 1 │
├────────────┤ └─────┘
│ [2] │ ───┐
└────────────┘ │ ┌─────┐
└───> │ 1 │
└─────┘
//Line 03 & 04
$arr4[0] = 2;
$arr4[1] = 2;
----------
┌──────┐ ┌─────┐
│ $a │ ──────────────────> │ 2 │ <─────────┐
└──────┘ └─────┘ │
^ │
┌─────────┐ │ │
│ $arr3 │ │ │
└─────────┘ │ │
│ │ │
│ │ │
└─────────> ┌────────────┐ │ │
│ Array │ │ │
│ container: │ │ │
├────────────┤ │ │
│ [0] │ ───┘ │
├────────────┤ ┌─────┐ │
│ [1] │ ───────> │ 1 │ │
├────────────┤ └─────┘ │
│ [2] │ ───┐ │
└────────────┘ │ ┌─────┐ │
└───> │ 1 │ │
└─────┘ │
│
┌─────────┐ │
│ $arr4 │ │
└─────────┘ │
│ │
│ │
└─────────> ┌────────────┐ │
│ Array │ │
│ container: │ │
├────────────┤ │
│ [0] │ ──────────────────┘
├────────────┤ ┌─────┐
│ [1] │ ───────> │ 2 │
├────────────┤ └─────┘
│ [2] │ ───┐
└────────────┘ │ ┌─────┐
└───> │ 1 │
└─────┘
So as you can see here even though you assigned $arr3 to $arr4 by value, not by reference! The array still contains that reference, which is shared with $a and $arr3[0].