#36956 [Opn->Bgs]: dirname returns \ for root /
| From: | tony2001@php.net | Date: | Tue, 04 Apr 2006 09:27:14 +0000 |
| Subject: | #36956 [Opn->Bgs]: dirname returns \ for root / | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95299@lists.php.net to get a copy of this message | ||
ID: 36956
Updated by: tony2001@php.net
Reported By: e dot vandeoudeweetering at marcanti dot esprit-sg dot
-Status: Open
+Status: Bogus
Bug Type: Directory function related
Operating System: Windows 2000 (5.00.2195) SP4
PHP Version: 5.1.2
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is expected, as Window$ uses \ everywhere instead of / on *nix.
Previous Comments:
------------------------------------------------------------------------
[2006-04-03 13:33:19] e dot vandeoudeweetering at marcanti dot
esprit-sg dot
Description:
------------
When using the function dirname, \ is returned for the root directory
/
This is what the documentation says:
//after PHP 4.3.0
dirname('c:/'); // returns 'c:'
Reproduce code:
---------------
print dirname('/');
print dirname('C:/');
print dirname('C:\\'); //this function works
Expected result:
----------------
/
C:
C:\
Actual result:
--------------
\
C:\
C:\
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36956&edit=1