What is =& in PHP?

前端 未结 5 1505
甜味超标
甜味超标 2021-01-17 11:17

Look at this example. There is a line:

  $client =& new xmlrpc_client(\'/xml-rpc\', \'api.quicktate.com\', 80);
  $client->return_type = \'xmlrpcvals         


        
5条回答
  •  悲哀的现实
    2021-01-17 12:04

    The =& assigns the variable a reference to the object rather than copying it. It is two separate operators (assignment and getting a reference) but they are often written together.

    The -> is a member access operator; in the example it means to get the return_type that belongs to the XML-RPC client.

提交回复
热议问题