|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2017-03-21 16:09 UTC] ab@php.net
 
-Status: Open
+Status: Not a bug
  [2017-03-21 16:09 UTC] ab@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
Description: ------------ PHP5.6 handled the same way file names without extension written either "filename" or "filename." (with dot character at the end of the file name). PHP7.1.3 handles both forms of file name only in some of the functions but throws warning "Permission denied" in others. OK functions: file_get_contents, file_exists Bad functions: file_put_contents, copy, rename Test script: --------------- 1) file_put_contents('test.', 'test.'); 2) file_put_contents('test.txt', 'test.txt'); copy('test.txt', 'test.'); 3) file_put_contents('test.txt', 'test.txt'); rename('test.txt', 'test.'); Expected result: ---------------- 1) File "test" written to file system with "test." content. 2) File "test" exists in file system with "test.txt" content. 3) File "test" exists in file system with "test.txt" content. Actual result: -------------- 1-3) Warning: Permission denied. Files not created.