$read = array ($sock1, $sock2);$read_pool = $read;socket_select ($read_pool, null, null, 0);if (in_array ($sock1, $read_pool)) { print "Can read from sock1\n";}