Req #69383 [Fbk->NoF]: Add glob_match() function
| From: | php-bugs at lists dot php dot net | Date: | Sun, 13 Oct 2019 04:22:08 +0000 |
| Subject: | Req #69383 [Fbk->NoF]: Add glob_match() function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-223190@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69383&edit=1
ID: 69383
Updated by: php-bugs@lists.php.net
Reported by: bschussek at gmail dot com
Summary: Add glob_match() function
-Status: Feedback
+Status: No Feedback
Type: Feature/Change Request
Package: Filesystem function related
Operating System: Ubuntu 14.04 LTS
PHP Version: 5.6.8RC1
Assigned To: cmb
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2019-09-29 12:25:27] cmb@php.net
Are you looking for fnmatch[1]?
[1] <https://www.php.net/fnmatch>
------------------------------------------------------------------------
[2015-04-06 13:33:46] bschussek at gmail dot com
Changed type to feature request
------------------------------------------------------------------------
[2015-04-06 13:32:45] bschussek at gmail dot com
Description:
------------
I'd love to see a function glob_match() that matches a path against a glob using the same rules
used by glob(). This function is needed when a virtual file system (implemented in PHP) should be
globbed for files.
Signature:
glob_match(string $path, string $glob[, int $flags = 0])
$path - a file system path
$glob - a glob
$flags - the glob() flags
Result: true if the path matches, false otherwise
Test script:
---------------
<?php
var_dump(glob_match('css/style.css', '*/*.css'));
var_dump(glob_match('js/script.js', '*/*.css'));
Expected result:
----------------
true
false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69383&edit=1