#45547 [NEW]: GLOB_MARK definition incorrect

From: Date: Thu, 17 Jul 2008 17:59:38 +0000
Subject: #45547 [NEW]: GLOB_MARK definition incorrect
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-960@lists.php.net to get a copy of this message
From: heikki dot removethis dot andthis at kaeraja dot com Operating system: All PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: GLOB_MARK definition incorrect 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 bug report at http://bugs.php.net/?id=45547&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45547&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45547&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45547&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=45547&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=45547&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=45547&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=45547&r=needscript Try newer version: http://bugs.php.net/fix.php?id=45547&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=45547&r=support Expected behavior: http://bugs.php.net/fix.php?id=45547&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=45547&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=45547&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=45547&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45547&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=45547&r=dst IIS Stability: http://bugs.php.net/fix.php?id=45547&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=45547&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=45547&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=45547&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=45547&r=mysqlcfg

« previous php.doc.bugs (#960) next »