#28247 [NEW]: CLI sapi option -R does not work as expected

From: Date: Sat, 01 May 2004 21:56:26 +0000
Subject: #28247 [NEW]: CLI sapi option -R does not work as expected
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59112@lists.php.net to get a copy of this message
From: aaron at wormus dot com Operating system: Windows 2000 PHP version: 5.0.0RC2 PHP Bug Type: CGI related Bug description: CLI sapi option -R does not work as expected Description: ------------ the following command line script does not work as (I) expected. php -R "echo fgets(STDIN);" Instead of echoing every line, it echos every OTHER line. I am not sure if this is the expected behaviour. I suspect something to be wrong. If it is meant to happen, I would appreciate a short explaination :) I'm writing an article on the CLI SAPI and this one is stumping me! Aaron Reproduce code: --------------- php -R "echo fgets(STDIN);" Expected result: ---------------- I expected it to work like: perl -e "while (<STDIN>){print}" echoing every line as you type it. Actual result: -------------- Echoes every OTHER line -- Edit bug report at http://bugs.php.net/?id=28247&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28247&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28247&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28247&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28247&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28247&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28247&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28247&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28247&r=support Expected behavior: http://bugs.php.net/fix.php?id=28247&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28247&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28247&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28247&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28247&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28247&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28247&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28247&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28247&r=float

« previous php.bugs (#59112) next »