Hello,
I was looking over the following code
|
if( is_array( $this->connectionHandler ) ) { |
|
$object = $this->connectionHandler[0]; |
|
$method = $this->connectionHandler[1]; |
|
$object->$method( $socketClient ); |
|
} |
|
else { |
|
$function = $this->connectionHandler; |
|
$function( $socketClient ); |
|
} |
And was asking why is not just
$function = $this->connectionHandler;
$function( $socketClient );
Can you give an example of a connectionHandler passed as an array?
Thanks!
Hello,
I was looking over the following code
php-multithreaded-socket-server/sock/SocketServer.php
Lines 79 to 87 in e23c3f1
And was asking why is not just
Can you give an example of a connectionHandler passed as an array?
Thanks!