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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 20:01:35 2025 UTC