php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26547 echo doesn't show until php finished (in DOS mode)
Submitted: 2003-12-07 08:58 UTC Modified: 2003-12-07 12:14 UTC
From: mycia at pchome dot com dot tw Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.4 OS: Windows 2000 Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mycia at pchome dot com dot tw
New email:
PHP Version: OS:

 

 [2003-12-07 08:58 UTC] mycia at pchome dot com dot tw
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-12-07 12:14 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #26238 (ALWAYS search the bug database before submitting another report about same issue..)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 07:01:32 2024 UTC