解决方案有两个:

1.在原函数参数列表上加上&号

function func(&$a){

}

2.在PHP.INI中进行一下设置

allow_call_time_pass_reference = On