引用不是指针。
<?php /** * References are not pointers. * * @param string &$string * @return void */ function foo(string &$string) { $string = &$GLOBALS['bar']; } $foo = 'foo'; $bar = 'bar'; foo($foo);