From:             igor at gameplasma dot com
Operating system: Linux
PHP version:      Irrelevant
PHP Bug Type:     Feature/Change Request
Bug description:  change the return value  of socket_select() !

Description:
------------
Hi, I've noticed that when using socket_select() it will return an integer
greater than 0 when something has happened to one of the sockets we are
watching.

Then, if we are watching, say 100 sockets, we must go through each one of
them until we find the one we can now access.

Instead, how about returning an array with 2 elements?

$array[0] will be a pointer to the socket that was changed
$array[1] will be "r" or "w" or "e" to indicate whether it's now avaible
for read, write, or there is an error :).

Thanks!


-- 
Edit bug report at http://bugs.php.net/?id=30926&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30926&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30926&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30926&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30926&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30926&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30926&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30926&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30926&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30926&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30926&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=30926&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=30926&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30926&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30926&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30926&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30926&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30926&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30926&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30926&r=mysqlcfg

Reply via email to