|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-16 14:08 UTC] vrana@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 21:00:01 2025 UTC |
Description: ------------ When copy() function is used to make a copy of an empty file on Windows, it returns "true".But according to the documentation : "Note: Windows compatibility: If you copy a file with no size, copy() will return FALSE, but the file will be correctly copied." but it outputs true on Windows as well as Linux on both php5 and php6. This behaviour is contradictory to that mentioned in documentation. It may require change in documentation. Reproduce code: --------------- <?php $file_handle = fopen("temp.txt", "w"); fclose($file_handle); var_dump(copy("temp.txt", "tempcopy.txt")); ?> Expected result: ---------------- bool(false) Actual result: -------------- bool(true)