7

I have a function in my class which utilizes the socket_select() function and I noticed that it's throwing this warning:

Strict Standards: *Only variables should be passed by reference*

This is how I'm using it, and yes, I did read the "Example #1 Using NULL with socket_select()" in the PHP Manual

$read = array($this->socket);
$write = NULL;
$except = NULL;

socket_select($read, $write, $except, 0, $this->socket_timeout);

This results in a big error spam when calling the function inside a while loop. Of course, I can suppress the E_STRICT errors, but I would like to know what's the exact issue here. My PHP version is 5.3.5

Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390
spidEY
  • 944
  • 7
  • 15

1 Answers1

1

Possibly it doesn't like a NULL reference?

I would try:

$read = array($this->socket);
$write = array();
$except = array();
BadPenguin
  • 21
  • 1
  • 3