I attempted to pass an explode statement into end() and got the following notice from my IDE, "Only variables can be passed by reference", which is not surprising.
However, what confuses me is that if I do something like
$array = ['cat', 'dog', 'bird'];
end($array);
echo print_r($array, true);
['cat', 'dog', 'bird'] prints out.
It is/was my understanding that passing something by references changes the value of the variable so I had expected $array to only print out 'Bird' after being passed into end().
I suspect I have a fundamental misunderstanding of passing something by reference...