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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2018 The PHP Group
All rights reserved.
Last updated: Mon Jul 16 10:01:53 2018 UTC