php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #69382 Support "/**/" in glob()
Submitted: 2015-04-06 13:23 UTC Modified: 2021-10-10 04:22 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: bschussek at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Filesystem function related
PHP Version: 5.6.8RC1 OS: Ubuntu 14.04 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
7 + 26 = ?
Subscribe to this entry?

 
 [2015-04-06 13:23 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-09-29 17:50 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-09-29 17:50 UTC] cmb@php.net
On non Windows systems, PHP's glob() is a wrapper over glob(3).
Is there any glob(3) implementation which supports /**/?
 [2021-10-10 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 16:03:40 2021 UTC