From: mycia at pchome dot com dot tw Operating system: Windows 2000 Pro PHP version: 4.3.4 PHP Bug Type: Output Control Bug description: echo doesn't show until php finished (in DOS mode)
Description: ------------ under Windows 2000 Pro DOS mode I use c:\php\php.exe -f c:\php\test.php to 'echo' one word for every second but nothing shown until the end of the execution I tested it in PHP 4.3.4 & 4.2.3 (Windows version) however, it works fine in PHP 4.1.2 (Windows version) ps: I didn't use any output control function Reproduce code: --------------- <?php //I didn't use output control like ob_start() //in PHP 4.3.4 & 4.2.3, I can't see each line for every second (doesn't happen in PHP 4.1.2) for($i=0;$i<5;$i++) { echo $i."\n"; flush(); //doesn't make any difference with or without this line sleep(1); } //all outputs are shown together at the end of the execution ?> Expected result: ---------------- it is expected to see each word every one second Actual result: -------------- nothing shown during the execution all results are shown together at the end of the execution -- Edit bug report at http://bugs.php.net/?id=26547&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26547&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26547&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26547&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26547&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26547&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=26547&r=needscript Try newer version: http://bugs.php.net/fix.php?id=26547&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26547&r=support Expected behavior: http://bugs.php.net/fix.php?id=26547&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26547&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26547&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26547&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26547&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26547&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26547&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26547&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26547&r=float