Req #69382 [Opn->Fbk]: Support "/**/" in glob()

From: Date: Wed, 29 Sep 2021 17:50:47 +0000
Subject: Req #69382 [Opn->Fbk]: Support "/**/" in glob()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236930@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69382&edit=1 ID: 69382 Updated by: cmb@php.net Reported by: bschussek at gmail dot com Summary: Support "/**/" in glob() -Status: Open +Status: Feedback Type: Feature/Change Request Package: Filesystem function related Operating System: Ubuntu 14.04 LTS PHP Version: 5.6.8RC1 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: On non Windows systems, PHP's glob() is a wrapper over glob(3). Is there any glob(3) implementation which supports /**/? Previous Comments: ------------------------------------------------------------------------ [2015-04-06 13:23:39] bschussek at gmail dot com Description: ------------ I would love to see support for "/**/" in glob(). That pattern would match zero or more directories in the path, like in Ant. Test script: --------------- <?php touch('style.css'); touch('script.js'); mkdir('dir'); touch('dir/reset.css'); foreach (glob('**/*.css') as $path) { echo $path."\n"; } Expected result: ---------------- style.css dir/reset.css Actual result: -------------- dir/reset.css ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69382&edit=1

« previous php.bugs (#236930) next »