[PHP-DEV] Bug #13086: fread design flaw From: clarkbattle <email protected>
Date: 08/31/01

From: clarkbattle <email protected>
Operating system: win2k
PHP version: 4.0.6
PHP Bug Type: Feature/Change Request
Bug description: fread design flaw

This is more of a design flaw than a bug. In C the fread() function
returns the number of bytes read. In php it returns the string read. The
C version is better. If you are reading binary data from a remote HTTP
source and you need to know how much data you have read it is impossible
with the PHP version. You cant read in a chunk then do a strlen() on the
chunk because its binary and may contain null chars. read() seems to have
the right interface but its experimental and only for sockets.

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

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>