|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50164 glob is case sensitive on windows where filenames are case insensitive.
Submitted: 2009-11-13 09:54 UTC Modified: 2010-12-01 16:32 UTC
Avg. Score:4.4 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:3 (75.0%)
From: RQuadling at GMail dot com Assigned:
Status: Open Package: Filesystem function related
PHP Version: 5.3.0 OS: win32 only - Windows XP SP3
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-11-13 09:54 UTC] RQuadling at GMail dot com
I'm not sure if this is just a documentation issue or another bug for windows.

Filenames on Windows are accessible case insensitive.

If you have a file ACamelCasedFile.php, then you cannot have a file aCamelCasedFile.PHP as these are considered to be the same name.

So, my expectation of the glob() function on Windows would be to support this aspect of the OS.

So, glob('*camel*') should return the file. Obviously it does not.

Whilst I can use bracing to supply variants, getting all the variants is a lot of effort - camel, Camel, cAmel, CAmel, caMel, CaMel, etc.

Remember that Windows doesn't care, so neither should glob(), at least on windows.

But, having to not break BC, would introducting a new flag GLOB_CASELESS be possible?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-01 16:32 UTC]
-Package: Feature/Change Request +Package: Filesystem function related
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Tue Jan 21 21:01:23 2020 UTC