This topic created in 3233 days ago, the information mentioned may be changed or developed.
1 replies • 2017-10-27 15:08:54 +08:00
 |
|
1
gouchaoer Oct 27, 2017
用&没有任何好处,因为对象默认就是按引用传递,实际上 array 用&也没啥好处,因为 array 本来就做 COW 优化,除非你想改变传入参数 array 的值。。。 至于 static 语法只是 singleton 模式而已,实际上 singleton 模式是一种反模式不值得鼓励的,因为很难测试。。。正确是用法是依赖注入
|