php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65954 glob('*') omits files
Submitted: 2013-10-24 07:05 UTC Modified: 2013-11-07 13:50 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bugzilla77 at gmail dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.5.5 OS: Win7 32/64
Private report: No CVE-ID: None
 [2013-10-24 07:05 UTC] bugzilla77 at gmail dot com
Description:
------------
1. Download Test script
2. Unzip
3. run test.php

Test script:
---------------
http://bugs.idsl.pl/php/glob.zip

Expected result:
----------------
prints: 4

Actual result:
--------------
prints: 1

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-05 17:25 UTC] willfitch@php.net
-Status: Open +Status: Not a bug
 [2013-11-05 17:25 UTC] willfitch@php.net
The default behavior of glob is to *not* return hidden files.  If you're looking to show specific hidden file types, you can use the following:

<?php
var_dump(glob('{,.}*', GLOB_BRACE));
?>

This will return files like ".hiddenfile".
 [2013-11-07 13:50 UTC] bugzilla77 at gmail dot com
.file is not hidden file on windows system
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 14:01:33 2024 UTC