#45279 [NEW]: Results of dirname() on paths ending with a /
| From: | ralph at deboom dot biz | Date: | Mon, 16 Jun 2008 10:59:07 +0000 |
| Subject: | #45279 [NEW]: Results of dirname() on paths ending with a / | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-125801@lists.php.net to get a copy of this message | ||
From: ralph at deboom dot biz
Operating system: Debian Etch 4.0+
PHP version: 5.2.6
PHP Bug Type: Directory function related
Bug description: Results of dirname() on paths ending with a /
Description:
------------
Quoted from: http://bugs.php.net/bug.php?id=841
[21 Dec 1998 2:06pm UTC] rasmus
The correct operations of these functions should be...
dirname returns everything PRIOR to the last / or \ in the path.
basename returns everything AFTER the last / or \ in the path.
----------------------------------------------------------------
There are several more people on www.php.net/dirname comments who are
confused by this aswell.
Reproduce code:
---------------
<?php
echo dirname('/dir1/dir2/dir3/');
Expected result:
----------------
/dir1/dir2/dir3
Or/And update the docs: www.php.net/dirname
Actual result:
--------------
/dir1/dir2
--
Edit bug report at http://bugs.php.net/?id=45279&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45279&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45279&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45279&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45279&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=45279&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45279&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45279&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45279&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45279&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45279&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=45279&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=45279&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45279&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45279&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45279&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45279&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45279&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45279&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45279&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45279&r=mysqlcfg