#45547 [Opn->Csd]: GLOB_MARK definition incorrect
| From: | kalle@php.net | Date: | Mon, 21 Jul 2008 12:57:28 +0000 |
| Subject: | #45547 [Opn->Csd]: GLOB_MARK definition incorrect | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-981@lists.php.net to get a copy of this message | ||
ID: 45547
Updated by: kalle@php.net
Reported By: heikki dot removethis dot andthis at kaeraja dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: All
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2008-07-17 17:59:37] heikki dot removethis dot andthis at kaeraja dot
com
Description:
------------
The documentation for the glob() function says:
GLOB_MARK - Adds a slash to each item returned
This seems to be incorrect, since the GLOB_MARK flag actually adds a
DIRECTORY_SEPARATOR to the returned items that are directories. Of
course, what is currently described in the documentation would not make
much sense anyway...
Tested with PHP 4.4.8 under vmlinuz 2.6.9-42.0.3.EL.xs0.4.0.263xenU
Tested with PHP 5.2.5 under Windows Vista
Reproduce code:
---------------
glob("./*",GLOB_MARK)
Expected result:
----------------
array("./file.ext/","./directory.ext/")
Actual result:
--------------
array("./file.ext","./directory.ext/")
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=45547&edit=1