Re: Re: PHP 4.0 Bug #6999 Updated: dirname() returns empty string for "/foo/"

From: Date: Tue, 03 Oct 2000 15:11:55 +0000
Subject: Re: Re: PHP 4.0 Bug #6999 Updated: dirname() returns empty string for "/foo/"
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-34167@lists.php.net to get a copy of this message
At 05:03 PM 10/3/00 +0200, Jaromír Dolecek wrote:
Bug Database wrote: I think the main problem here is to decide what the behavior should be before we apply patches. Is "/foo/" supposed to result in "/" or "/foo". I don't know either. I've checked C implementation of dirname() on NetBSD and it returns "/", as does dirname(1). dirname(1) on Solaris prints "/", too. So the POSIX.2 correct answer is probably to return "/".
Didn't know this is actually a standard :) I guess your argument is by far the best and it's probably best to go with POSIX on this one. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.dev (#34167) next »