[PHP-DEV] fpassthru should get an optional length argument
ref https://bugs.php.net/bug.php?id=39135 , i was thinking about how to implement HTTP Range requests/HTTP 206 Partial Content in userland php, and ofc it's possible to implement using fread() loops, but it'd be easier (and faster? presumably) to implement if fpassthru() natively supported a $max_bytes=null argument, an example of where it would be useful:
[PHP-DEV] search on bugs.php.net appears to be semi-broken ?
for whatever reason, searching for "fpassthru" on bugs.php.net does not find https://bugs.php.net/bug.php?id=39135 , titled "fpassthru with optional argument length" - screenshot: https://i.imgur.com/gUjNYBz.png that nearly caused me to make a duplicate of 39135 today
Re: [PHP-DEV] fpassthru should get an optional length argument
Le 30/10/2021 à 11:39, Hans Henrik Bergan a écrit : ref https://bugs.php.net/bug.php?id=39135 , i was thinking about how to implement HTTP Range requests/HTTP 206 Partial Content in userland php, and ofc it's possible to implement using fread() loops, but it'd be easier (and faster? presumably) to implement if fpassthru() natively supported a $max_bytes=null argument, an example of where it would be useful: Hello, Can't you use fseek() and stream_copy_to_stream() to achieve what you're trying to do without consuming memory ? Regards, -- Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php