ID: 36030
Comment by: voidroid at gmail dot com
Reported By: silencer at inbox dot ru
Status: Open
Bug Type: Feature/Change Request
Operating System: Gentoo Linux
PHP Version: 5.2.10
New Comment:
Still does not work with PHP 5.3.0
Using the following as an alternative:
$current_choice = trim(`bash -c "read -s -t 1 -n 1 ANS; echo
\\\$ANS"`);
It times out after 1 second but I would prefer less as I want a quicker
refresh!
Previous Comments:
------------------------------------------------------------------------
[2009-06-30 16:20:59] silencer at inbox dot ru
Still don't working with
PHP 5.2.10-pl0-gentoo (cli)
------------------------------------------------------------------------
[2006-01-16 10:56:22] silencer at inbox dot ru
Description:
------------
stream_set_timeout can't be used for php://stdin (PHP executed as CGI,
not Apache module).
Bug #22837 describe same problem for PHP4 and promises "better support"
in PHP5, but still don't working.
Reproduce code:
---------------
<?php
$fp=fopen('php://stdin','r');
stream_set_timeout($fp,1) or die ('Failed');
echo 'Success';
?>
Expected result:
----------------
output "Success"
Actual result:
--------------
output "Failed"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36030&edit=1