我想问一下如何在php中转换:method(Class1::Class2 &class);
?
我该怎么写:me->method(????)
HX。欣赏
我在c __ / ubuntu工作。
答案 0 :(得分:1)
以同样的方式:
function method(&$variable)
但是,如果&class
是一个对象,则没有必要 - 因为PHP 5,对象会自动作为参考传递。 a kind of references in themselves,所以这不是必需的。