From: nyim at 163 dot com Operating system: suse10 linux 32 bit PHP version: 5.2.9 PHP Bug Type: Streams related Bug description: stream_set_timeout no accept parameters smaller than 1 second
Description: ------------ stream_set_timeout($udp, 0,300); just like stream_set_timeout($udp, 0); it ignore the third parameter strace the process: poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLERR}], 1, 0) = 1 Reproduce code: --------------- <?php $udp = stream_socket_client("udp://127.0.0.1:3434"); fwrite($udp,'xx'); stream_set_timeout($udp, 0,300); $time = microtime(true); fread($udp,1500); echo microtime(true) - $time; Expected result: ---------------- 0.30182409286499 Actual result: -------------- 3.3140182495117E-5 -- Edit bug report at http://bugs.php.net/?id=47973&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47973&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47973&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47973&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47973&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47973&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47973&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47973&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47973&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47973&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47973&r=support Expected behavior: http://bugs.php.net/fix.php?id=47973&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47973&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47973&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47973&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47973&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47973&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47973&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47973&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47973&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47973&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47973&r=mysqlcfg