|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76974 file_exists() resolves "/existing/path/////"
Submitted: 2018-10-05 00:19 UTC Modified: 2018-10-05 01:04 UTC
From: bendietze at yahoo dot de Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 7.2.10 OS: PHP 7.2.10-0ubuntu0.18.04.1
Private report: No CVE-ID: None
 [2018-10-05 00:19 UTC] bendietze at yahoo dot de
if (file_exists("/existing/path/////")) echo "why that?";
But only with a existing path! before ///

Test script:
if (file_exists("/existing/path/////")) echo "// is equal to ////////// and all together true";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-05 00:24 UTC]
-Status: Open +Status: Not a bug
 [2018-10-05 00:24 UTC]
Because Linux doesn't care about repeated slashes.
 [2018-10-05 00:25 UTC] Wes dot example at example dot org
That is how paths work. Contiguous / are interpreted as one
 [2018-10-05 01:04 UTC] bendietze at yahoo dot de
OMG 10 years ago. Sorry
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 13:01:25 2021 UTC