什么是=&在PHP中? [英] What is =& in PHP?
本文介绍了什么是=&在PHP中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
看这个例子.有一行:
$client =& new xmlrpc_client('/xml-rpc', 'api.quicktate.com', 80);
$client->return_type = 'xmlrpcvals';
=&
是什么?$client->return_type
中的->
是什么意思?
What is the =&
and what does the ->
in $client->return_type
mean?
推荐答案
=
和&
应该*之间有一个空格-它们是两个不同的运算符. &
表示获取对此的引用.
The =
and the &
should* have a space between them - they're two different operators. The &
means get a reference to this.
->
用于对象成员访问-这意味着将'xmlrpcvals'分配给$client
的return_type
成员.
The ->
is for object member access - this means assign 'xmlrpcvals' to the return_type
member of $client
.
*请参阅注释以进行澄清
* see comments for clarification
这篇关于什么是=&在PHP中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文