|
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-2026 The PHP GroupAll rights reserved. |
Last updated: Sun May 03 21:00:01 2026 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)