What does this signature mean (&) in PHP?

后端 未结 3 1636
臣服心动
臣服心动 2020-12-16 22:04

Consider:

public function & get($name, $default = null)

Why &?

3条回答
  •  眼角桃花
    2020-12-16 22:26

    It means it returns a reference to the result as opposed to a copy of it.

    Returning References in PHP

提交回复
热议问题