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: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: bschussek at gmail dot com Assigned:
Status: Open 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
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: bschussek at gmail dot com
New email:
PHP Version: OS:

 

 [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

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Nov 23 19:01:26 2020 UTC