开发者

php how to add a reference

开发者 https://www.devze.com 2023-04-04 00:32 出处:网络
i would like to ask how to convert: method(Class1::Class2 &class); in php? what should i write:me->开发者_JAVA百科method(????)

i would like to ask how to convert: method(Class1::Class2 &class); in php? what should i write: me->开发者_JAVA百科method(????)

hx. appreciate

I am working in c__/ubuntu.


The same way:

function method(&$variable)

However, if &class is an object, it's not necessary - since PHP 5, objects are automatically passed as reference. a kind of references in themselves, so this isn't necessary.

0

精彩评论

暂无评论...
验证码 换一张
取 消