note 34050 deleted from function.stream-get-meta-data by nlopess

From: Date: Thu, 11 Nov 2004 16:17:30 +0000
Subject: note 34050 deleted from function.stream-get-meta-data by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-80410@lists.php.net to get a copy of this message
Note Submitter: phpmanSPAMSPAMGOAWAY at jonathanday dot com ---- A heads up to anyone using this with stream blocking set to false... 'unread_bytes' in the returned array may be set to '0' even if there ARE unread_bytes, which may not be what one intuitively expects. A suitable work around is to call fread($your_fp, 1) before calling stream_get_meta_data, which has the effect of 'refreshing' the returnable values. Of course, doing this, you would want to assign the return value of 'fread' to some meaningful collector variable so as to account for the possibly lost byte, depending on whether or not there was actually any unread bytes. This behavior is current as of PHP 4.3.2 on Redhat Linux 7.3.

« previous php.notes (#80410) next »