note 100026 deleted from function.feof by danbrown

From: Date: Tue, 21 Sep 2010 16:59:55 +0000
Subject: note 100026 deleted from function.feof by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-172723@lists.php.net to get a copy of this message
Note Submitter: Thomas ---- @Johannes According to stream_get_meta_data, the eof field does not take into account data that has been buffered before the stream ended but haven't been read yet, so you may detect an eof even when there's still data to read. I guess it might be ok to follow a stream_get_meta_data eof check with a non-blocking read until getting EAGAIN, then assume there is nothing else to read, but since it's not documented it would still be safer to read and understand the underlying code before doing so.

« previous php.notes (#172723) next »