Also do not forget that those arrays are passed by reference and will be modified after socket_select() returns.
On exit, the arrays are modified to indicate which socket resource actually changed status.