Bug #13086: fread design flaw

From: Date: Fri, 31 Aug 2001 23:24:43 +0000
Subject: Bug #13086: fread design flaw
Groups: php.dev 
Request: Send a blank email to php-dev+get-64866@lists.php.net to get a copy of this message
From: clarkbattle@hotmail.com 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

« previous php.dev (#64866) next »