- Notice: Only variables should be passed by reference in……
原因:The problem is, that end
requires a reference, because it modifies the internal representation of the array (i.e. it makes the current element pointer point to the last element).
end函数: mixed end
( array &$array
)
你可以看到end的参数是一个引用(reference),而你只能把一个变量的引用作为一个参数传给函数,而你直接把explode('.',$name)作为参数传给end函数,所以才有这个提示。