note 130290 added to function.basename
| From: | bobray@softville.com | Date: | Mon, 12 May 2025 20:25:24 +0000 |
| Subject: | note 130290 added to function.basename | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-222137@lists.php.net to get a copy of this message | ||
You might expect that echo basename('directory_name/') would return an empty string.
Instead, it returns 'directory_name', without the slash.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 2607:fb91:ba0:8666:8a4:951b:22b5:776c)
----
Manual Page -- https://php.net/manual/en/function.basename.php
Edit -- https://main.php.net/note/edit/130290
Del: integrated -- https://main.php.net/note/delete/130290/integrated
Del: useless -- https://main.php.net/note/delete/130290/useless
Del: bad code -- https://main.php.net/note/delete/130290/bad+code
Del: spam -- https://main.php.net/note/delete/130290/spam
Del: non-english -- https://main.php.net/note/delete/130290/non-english
Del: in docs -- https://main.php.net/note/delete/130290/in+docs
Del: other reasons-- https://main.php.net/note/delete/130290
Reject -- https://main.php.net/note/reject/130290
Search -- https://main.php.net/manage/user-notes.php