|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-04-14 12:19 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 09 04:00:01 2025 UTC |
Description: ------------ The stream progress notifications are reporting twice as high numbers (and twice as often) as they should. Reproduce code: --------------- <?php function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { switch($notification_code) { case STREAM_NOTIFY_PROGRESS: var_dump($bytes_transferred); break; } } $ctx = stream_context_create(); stream_context_set_params($ctx, array("notification" => "stream_notification_callback")); $str = file_get_contents("http://no.php.net/get/php_manual_en.tar.gz/from/this/mirror", null, $ctx, 0, 8192); var_dump(strlen($str)); echo "\nDone!\n"; Expected result: ---------------- int(0) int(0) int(1440) int(2880) int(4320) int(5760) int(7200) int(8192) Done! Actual result: -------------- int(0) int(0) int(1440) int(2880) int(4320) int(5760) int(7200) int(8640) int(10080) int(11520) int(12960) int(14400) int(8192)