What does this signature mean (&) in PHP?
问题 Consider: public function & get($name, $default = null) Why & ? 回答1: In PHP's syntax, this means that the function returns a reference instead of a value. For example: <?php $foo = 'foo'; function & get_foo_ref () { global $foo; return $foo; } // Get the reference to variable $foo stored into $bar $bar = & get_foo_ref(); $bar = 'bar'; echo $foo; // Outputs 'bar', since $bar references to $foo. ?> In the above example, removing the & from the function declaration would make the $foo variable