# Using a cross-platform glob implementation on all platforms

- Thread: https://externals.io/message/126963
- Original archive: https://news-web.php.net/php.internals/126963
- Started by Calvin Buckley on 2025-03-27T21:18:51+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #126963 — Calvin Buckley — 2025-03-27T21:18:51+00:00

URL: https://externals.io/message/126963#126963

Hi internals,

Following some discussion in [GH-15564] about providing a cross-platform
glob implementation, I've done the work to make the implementation used
on Windows (which is from OpenBSD) the default on all platforms. You can
see it at [GH-18164]. CI is currently passing with this.

The code change is pretty minimal beyond cleanup. There are some things
that might need to be changed (i.e. if we want to support system glob
implementations), but those can be put off the table. It does simplify
some documentation concerns as well. I raise the question to internals
to see if this should be done or if it's big enough to merit an RFC.

Regards,
Calvin

[GH-18164]: https://github.com/php/php-src/pull/18164
[GH-15564]: https://github.com/php/php-src/pull/15564

---

## #126970 — Juris Evertovskis — 2025-03-28T15:57:37+00:00

URL: https://externals.io/message/126963#126970 · In reply to: #126963

-----Original Message-----
From: Calvin Buckley <calvin@cmpct.info> 
Sent: Thursday, March 27, 2025 11:19 PM
To: php internals <internals@lists.php.net>
Subject: [PHP-DEV] Using a cross-platform glob implementation on all
platforms

> CI is currently passing with this.

Hi,

It looks like you didn't have to adjust any tests. Can you clarify if there
are any observable behaviour changes that you're aware of?

BR,
Juris

---

## #127041 — tim@bastelstu.be — 2025-04-04T11:14:27+00:00

URL: https://externals.io/message/126963#127041 · In reply to: #126963

Hi

Am 2025-03-27 22:18, schrieb Calvin Buckley:
> The code change is pretty minimal beyond cleanup. There are some things
> that might need to be changed (i.e. if we want to support system glob
> implementations), but those can be put off the table. It does simplify
> some documentation concerns as well. I raise the question to internals
> to see if this should be done or if it's big enough to merit an RFC.

I've been bitten in the past by `glob()` behaving differently on Solaris 
than it does on GNU/Linux (GLOB_BRACE missing on Solaris), so I am in 
favor of unifying the behavior.

As far as I understand the PR, there is no breaking change, the proposed 
implementation is the “most featureful” of all of the supported 
platforms? Then I don't think this requires an RFC.

Best regards
Tim Düsterhus
