|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72900 stream_copy_to_stream() can also return false
Submitted: 2016-08-19 16:58 UTC Modified: 2016-08-19 22:48 UTC
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: alexxz at alexxz dot ru Assigned: cmb (profile)
Status: Closed Package: Streams related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2016-08-19 16:58 UTC] alexxz at alexxz dot ru
Return Values ΒΆ

Returns the total count of bytes copied.

Documentation says function returns int. But in fact it returns false on error.

Test script:
dd if=/dev/zero of=test bs=1024 count=10000
sudo losetup -f test
sudo mkfs.ext4 /dev/loop0
sudo mount /dev/loop0 /media/alexxz/
sudo chown alexxz /media/alexxz/
/usr/bin/time php -n -r 'var_dump(stream_copy_to_stream(fopen("/dev/zero", "r"), fopen("/media/alexxz/s", "w")));'
df -h


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-19 17:09 UTC]
-Package: Documentation problem +Package: Streams related
 [2016-08-19 22:35 UTC]
-Summary: stream_copy_to_stream function documentaion is incomplete on return value +Summary: stream_copy_to_stream() can also return false -Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2016-08-19 22:48 UTC]
Automatic comment from SVN on behalf of cmb
Log: Fix #72900: stream_copy_to_stream() can also return false
 [2016-08-19 22:48 UTC]
-Status: Verified +Status: Closed
 [2016-08-19 22:48 UTC]
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:06 UTC]
Automatic comment on behalf of cmb
Log: Fix #72900: stream_copy_to_stream() can also return false
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 09:01:28 2024 UTC