Date: 12/21/98
- Next message: Jouni Ahto: "[PHP-DEV] Re: [PHP-BETA] New tarball rolled - Monday 10:30 AM EST"
- Previous message: Bug Database: "[PHP-DEV] Bug #841 Updated: basename() & dirname() do not parse path correctly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 841
Updated by: rasmus
Reported By: inlan <email protected>
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:
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.
Reason for this is that we do not stat the file to check if it exists. There are uses for these functions even in the case the directory or file is no there. Therefor, we have no way to know if in some instances,
such as 'something' or '/something', it is a directory or file being refered to, even if there is a dot in the string, directories can also have dots. So it is a matter of best guess.
Any other developers have comments?
I agree with this assessment. And as the original ChangeLog entry stated, it is similar to the Bourne shell versions by the same names. The functionality described above might be useful as a separate set of functions, but I would not consider it a bug in basename/dirname.
Full Bug description available at: http://ca.php.net/bugs.php3?id=841
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: Jouni Ahto: "[PHP-DEV] Re: [PHP-BETA] New tarball rolled - Monday 10:30 AM EST"
- Previous message: Bug Database: "[PHP-DEV] Bug #841 Updated: basename() & dirname() do not parse path correctly"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

