php.net |  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
Votes:7
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: RQuadling at GMail dot com
New email:
PHP Version: OS:

 

 [2009-11-13 09:54 UTC] RQuadling at GMail dot com
Description:
------------
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?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-01 16:32 UTC] jani@php.net
-Package: Feature/Change Request +Package: Filesystem function related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 13:01:25 2019 UTC