|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74191 file_exists needs option to use include path
Submitted: 2017-03-01 15:51 UTC Modified: 2020-12-09 17:46 UTC
Avg. Score:2.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: dpfender44 at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: *General Issues
PHP Version: 7.1.2 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-03-01 15:51 UTC] dpfender44 at gmail dot com
It would be nice to have an option for file_exists() that would do a search using the include path.  This would allow a validity check for a file to be included with "include_once" or "require_once".  These functions use the include path to find a file.  Currently, I have programmed my own function called my_file_exists() to be used instead of file_exists() so the test is done on all directories in the include path.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-08 05:07 UTC]
? This wouldn't actually be terribly difficult, but I have to ask: Given that it's fairly trivial to do in userspace, what's the problem with doing it there?
 [2017-07-31 21:22 UTC] gmblar+php at gmail dot com
 [2020-12-09 17:46 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2020-12-09 17:46 UTC]
I can't see a single good reason for adding this functionality;
besides that it can easily be implemented in userland, it still
doesn't prevent potential race conditions.  If you feel strongly
that it would be a useful addition, please forward the request to
the internals mailing list.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Mar 04 19:01:24 2021 UTC