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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC