|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-06-07 15:53 UTC] iliaa@php.net
[2004-06-08 04:55 UTC] phpbugs at atu dot cjb dot net
[2004-06-08 05:27 UTC] iliaa@php.net
[2004-06-08 06:48 UTC] phpbugs at atu dot cjb dot net
[2004-06-08 10:01 UTC] derick@php.net
[2004-07-03 11:42 UTC] et@php.net
[2020-02-07 06:12 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 22:00:02 2025 UTC |
Description: ------------ A trailing forward slash is ignored by glob(), but is not with standard UNIX wildcard matching. ls -lp Dir drwx------ 2 raven users 48 Jun 6 15:26 CSS/ drwx------ 2 raven users 48 Jun 6 15:26 Extra/ drwx------ 2 raven users 48 Jun 6 15:26 Images/ -rw------- 1 raven users 0 Jun 6 15:26 Main.data -rw------- 1 raven users 0 Jun 6 15:26 index.php echo Dir/*/ Dir/CSS/ Dir/Extra/ Dir/Images/ Reproduce code: --------------- foreach (glob("Dir/*/") as $Dir) { echo "$Dir "; } Expected result: ---------------- Dir/CSS/ Dir/Extra/ Dir/Images/ Actual result: -------------- Dir/CSS/ Dir/Extra/ Dir/Images/ Dir/Main.data Dir/index.php