|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-07-10 19:59 UTC] requinix@php.net
[2018-07-11 08:26 UTC] gbuza at inviqa dot com
[2018-07-12 22:06 UTC] cmb@php.net
-Type: Bug
+Type: Feature/Change Request
[2018-07-12 22:06 UTC] cmb@php.net
[2021-07-28 09:14 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2021-07-28 09:14 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 12:00:01 2025 UTC |
Description: ------------ When stream notification callback is used with fopen() function, it does not get called at all. Test script: --------------- <?php file_put_contents('/tmp/input.txt', 'foo bar baz'); function stream_notification_callback($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) { die('It made progress.'); } $context = stream_context_create(); stream_context_set_params($context, ['notification' => 'stream_notification_callback']); $input = fopen('/tmp/input.txt', 'r', false, $context); $output = fopen('/tmp/output.txt', 'w'); stream_copy_to_stream($input, $output); fclose($input); fclose($output); Expected result: ---------------- I expect to see the message "It made progress." on the standard output and the file /tmp/output.txt should not exist. Actual result: -------------- No message is displayed and the file /tmp/output.txt is created.