Bug #76974 [Com]: file_exists() resolves "/existing/path/////"

From: Date: Fri, 05 Oct 2018 00:25:07 +0000
Subject: Bug #76974 [Com]: file_exists() resolves "/existing/path/////"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217424@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76974&edit=1 ID: 76974 Comment by: Wes dot example at example dot org Reported by: bendietze at yahoo dot de Summary: file_exists() resolves "/existing/path/////" Status: Not a bug Type: Bug Package: Filesystem function related Operating System: PHP 7.2.10-0ubuntu0.18.04.1 PHP Version: 7.2.10 Block user comment: N Private report: N New Comment: That is how paths work. Contiguous / are interpreted as one Previous Comments: ------------------------------------------------------------------------ [2018-10-05 00:24:35] requinix@php.net Because Linux doesn't care about repeated slashes. ------------------------------------------------------------------------ [2018-10-05 00:19:03] 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"; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76974&edit=1

« previous php.bugs (#217424) next »