【问题标题】:PHP, Codeigniter - Singleton, What about the use of '&' in function declarationPHP,Codeigniter - Singleton,在函数声明中使用'&'怎么样
【发布时间】:2014-12-02 14:04:16
【问题描述】:

为什么在声明函数时在函数名前使用'&',我从未见过在声明中使用&。

函数 &load_class($class, $directory = 'libraries', $prefix = 'CI_')
参考。第 120 行,在 system/core/common.php (Version-CodeIgniter 2.2)

【问题讨论】:

    标签: php codeigniter singleton codeigniter-2 function-pointers


    【解决方案1】:

    & 表示函数将返回一个变量的引用,而不是一个值;

    http://php.net/references.return

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-20
      • 1970-01-01
      • 2013-04-29
      • 2014-12-28
      • 1970-01-01
      相关资源
      最近更新 更多