开发者

What does "&" mean in this case?

开发者 https://www.devze.com 2022-12-20 13:14 出处:网络
I know that it\'s creating a re开发者_如何学Cference in other cases. But what happens here? $crawler = &new MyCrawler();

I know that it's creating a re开发者_如何学Cference in other cases. But what happens here?

$crawler = &new MyCrawler();


It creates an instance of MyCrawler and passes the reference for that instance into $crawler. In PHP5 this is assumed so the use of the & is deprecated.

See Object References (the Ampersand).


That is deprecated per the PHP documentation

0

精彩评论

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

关注公众号