I am also thrown by the reference operator in “f1” not changing the contents of $arr2 by reference when “f1” is called from “f2”. Surely this is assignment by reference and a return statement isn’t needed.?
Why doesn’t $arr2 have it’s value changed? I just don’t get it.
Is there a requirement that when a function is called from within another function, the called function MUST have a return statement otherwise the result will always be NULL? Even if the called function is using assignment by reference on the array that’s passed in.
I’ve tried adding a return in “f1”, doesn’t make any difference to what echo shows.