为什么在array_slice中有一个&before $输入(数组和$ input,int $ offset [,int $ length = 0 [,mixed $ replacement]])

array array_splice  ( array &$input  , int $offset  [, int $length = 0  [, mixed $replacement  ]] )

Why is there an & before $input?

That means the $input array is passed by reference, so any changes made in the function affect that array. The default behaviour is to pass a copy, so changes made inside the function don't affect the original.

The & indicates that this is a reference, i.e. the array is not copied and any changes to input made by array_splice will be reflected in the input array. See the PHP reference for more details.