ID:               35507
 Updated by:       [EMAIL PROTECTED]
 Reported By:      dsp at tdcspace dot dk
-Status:           Open
+Status:           Feedback
 Bug Type:         Feature/Change Request
 Operating System: win/nix
 PHP Version:      5.1.1
 New Comment:

And how do you propose to distinguish "slow input" from "no input"?
Where exactly there should be EOF in a *stream*?


Previous Comments:
------------------------------------------------------------------------

[2005-12-01 18:58:29] dsp at tdcspace dot dk

Better explain that the loop waits for a keyboard input
despite there is no input.

------------------------------------------------------------------------

[2005-12-01 18:47:38] dsp at tdcspace dot dk

Description:
------------
In a continous loop for processing data with options for
entering a process char (like 'q' for quit, etc.) - the 
feof() does not report no input (EOF) from STDIN (keyboard).
note: This is about the CLI version

example: the loop should output ....<keypress char>....etc

  do {
    if ( !feof(STDIN) ) { $x = fgetc(STDIN); echo $x; }
    echo '.';
     }
  while(true);


THE PHP MANUAL SAYS -------------------------

feof (PHP 3, PHP 4, PHP 5)

feof -- Tests for end-of-file on a file pointer

Description

bool feof ( resource handle )

Returns TRUE if the file pointer is at EOF or an error occurs
(including socket timeout); otherwise returns FALSE. 
-----------------------------------------------

Apparantly "Tests for end-of-file on a file pointer" does
not TEST for anything !!





------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35507&edit=1

Reply via email to