SMTP class question
iFlash opened this issue · comments
In the SMTP class' send method, there is the following bit:
if (!$mock) {
$socket=&$this->socket;
$socket=@stream_socket_client($this->host.':'.$this->port,
$errno,$errstr,ini_get('default_socket_timeout'),
STREAM_CLIENT_CONNECT,$this->context);
...
...
What is the question?
That's odd – there used to be a question which was:
$socket is assigned a value and then, in the next line, assigned the result of the stream_socket_client call. What I don't understand: Why assign it the address of this->socket first if it's not used? Maybe my understanding lacks here, sorry.
The first assignment sets the variable as a reference to this->socket and the following assignment sets a new variable content (to both).