#45279 [Opn->Asn]: Results of dirname() on paths ending with a /

From: Date: Fri, 20 Jun 2008 08:31:09 +0000
Subject: #45279 [Opn->Asn]: Results of dirname() on paths ending with a /
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125911@lists.php.net to get a copy of this message
ID: 45279 Updated by: dmitry@php.net Reported By: ralph at deboom dot biz -Status: Open +Status: Assigned Bug Type: Directory function related Operating System: Debian Etch 4.0+ PHP Version: 5.2.6 -Assigned To: +Assigned To: dmitry Previous Comments: ------------------------------------------------------------------------ [2008-06-20 08:04:16] ralph at deboom dot biz Where is the support on this bug...? ------------------------------------------------------------------------ [2008-06-16 10:59:07] ralph at deboom dot biz 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 this bug report at http://bugs.php.net/?id=45279&edit=1

« previous php.bugs (#125911) next »