Justtechjobs.com Find a programming school near you






Online Campus Both


php-developer-list | 2000101

Re: [PHP-DEV] Re: PHP 4.0 Bug #6999 Updated: dirname() returns empty string for "/foo/" From: Andi Gutmans (andi <email protected>)
Date: 10/03/00

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 <email protected>>
http://www.zend.com/

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>