Req #69057 [Opn->Fbk]: fread() should return bytes read count

From: Date: Sun, 15 Feb 2015 19:27:23 +0000
Subject: Req #69057 [Opn->Fbk]: fread() should return bytes read count
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190702@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69057&edit=1 ID: 69057 Updated by: ab@php.net Reported by: grzegorz129 at gmail dot com Summary: fread() should return bytes read count -Status: Open +Status: Feedback Type: Feature/Change Request Package: Filesystem function related Operating System: All PHP Version: 5.6.5 Block user comment: N Private report: N New Comment: strlen(fread(....)) ? Thanks. Previous Comments: ------------------------------------------------------------------------ [2015-02-15 15:15:37] grzegorz129 at gmail dot com Description: ------------ PHP fread() should provide the same amount of informations as C fread(). fread() in C besides actual data also provides number of bytes read. PHP also implemented similar behaviour but only for fwrite() function. Changing returned value is of course not an option, but adding optional third parameter is. Expected result: ---------------- Declaration of PHP fread() can be changed to: string fread ( resource $handle , int $length [, int &$size ] ) Actual result: -------------- Current declaration of fread() doesn't contain read bytes parameter. string fread ( resource $handle , int $length ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69057&edit=1

« previous php.bugs (#190702) next »