php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80396 Please support apline's GLOB_BRACE
Submitted: 2020-11-21 14:25 UTC Modified: 2020-11-21 14:36 UTC
From: 2016teemo at google dot com Assigned:
Status: Wont fix Package: *Extensibility Functions
PHP Version: 7.2.34 OS: apline
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-11-21 14:25 UTC] 2016teemo at google dot com
Description:
------------
---
From manual page: https://php.net/function.glob
---


Please support apline's GLOB_BRACE


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-11-21 14:33 UTC] danack@php.net
-Status: Open +Status: Duplicate
 [2020-11-21 14:33 UTC] danack@php.net
Duplicate of https://bugs.php.net/bug.php?id=72095

To be clear, the standard C library used on Alpine which is called Musl does not support GLOB_BRACE. There is no way for PHP to 'support' something that does not exist on the platform that you're running PHP on.

I suggest using the workaround in the other ticket, or not using Alpine if you need GLOB_BRACE support.
 [2020-11-21 14:36 UTC] danack@php.net
-Status: Duplicate +Status: Wont fix
 [2020-11-21 14:36 UTC] danack@php.net
Unmarking as duplicate, as the other bug is actually about the doc editor code...but it's still not something that can be fixed in PHP. You need to persuade the people who maintain Musl to add it.
 [2020-11-21 14:44 UTC] danack@php.net
Sorry, I just realised the other ticket doesn't contain a work around. You'd need to expand it yourself....

"They are used during expansion of the brace expression of the deeper level. The example below shows this

glob ("{foo/{,bar,biz},baz}", GLOB_BRACE, NULL, &result) 

is equivalent to the sequence

glob ("foo/", GLOB_BRACE, NULL, &result)
glob ("foo/bar", GLOB_BRACE|GLOB_APPEND, NULL, &result)
glob ("foo/biz", GLOB_BRACE|GLOB_APPEND, NULL, &result)
glob ("baz", GLOB_BRACE|GLOB_APPEND, NULL, &result)"
 [2020-11-21 14:58 UTC] danack@php.net
There's a fallback method in zendframework - which may or may not work https://github.com/zendframework/zend-stdlib/blob/6d965efcce81ee60e2b425792f1cd3f27aed82d9/src/Glob.php#L97-L168
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 26 15:03:35 2021 UTC