|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64860 Missing documentation for new return value in function is_file
Submitted: 2013-05-16 13:02 UTC Modified: 2016-09-09 16:47 UTC
From: spasic dot dejan at yahoo dot de Assigned: cmb (profile)
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: spasic dot dejan at yahoo dot de
New email:
PHP Version: OS:


 [2013-05-16 13:02 UTC] spasic dot dejan at yahoo dot de
PHP 5.4.x

It was added a new return value for the function is_file. When given parameter 
which is given includes a trailing null byte, it returns NULL instead of FALSE. 
This information is missing!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-25 00:19 UTC]
What's the change? Does it affect other file functions? The PHP changelog does not 
mention this (or so it seems) but if there is something to document here then the 
following should also be updated:
 [2015-05-27 17:35 UTC]
As of PHP 5.4.0 function is_file() expects a valid path instead of
a general string (ZPP p instead of s). paths, however, must not
contain null bytes. In case of an invalid pathname a respective
warning is thrown. See also <>.

With regard to the return value there's already a note on the
"Internal (built-in) functions" man page[1]:

| If the parameters given to a function are not what it expects,
| such as passing an array where a string is expected, the return
| value of the function is undefined. In this case it will likely
| return NULL but this is just a convention, and cannot be relied
| upon.

I'm not sure if there is the need for further documentation.

[1] <>
 [2016-09-09 16:47 UTC]
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2016-09-09 16:47 UTC]
> I'm not sure if there is the need for further documentation.

Actually, I'm rather sure that there's no need for further
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Aug 18 08:05:46 2022 UTC