开发者

Only variables should be passed by reference - socket_select()

开发者 https://www.devze.com 2023-03-24 04:19 出处:网络
I have a function in my class which utilizes the socket_select() function and I noticed that it\'s throwing this warning:

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 h开发者_JS百科ow 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


Possibly it doesn't like a NULL reference?

I would try:

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

精彩评论

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