php.net |  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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bendietze at yahoo dot de
New email:
PHP Version: OS:

 

 [2018-10-05 00:19 UTC] bendietze at yahoo dot de
Description:
------------
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";



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-05 00:24 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2018-10-05 00:24 UTC] requinix@php.net
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-2020 The PHP Group
All rights reserved.
Last updated: Fri Dec 04 03:01:23 2020 UTC