Tobias Schlitt wrote:
using string manipulation, I now patched pathinfo() to provide the
filename without extension per default with key "filename".
Find the patch here: http://schlitt.info/misc/pathinfo.patch
If the patch is considered then I would propose to also return the key
"filename" if the filename does not have a suffix. The current code
seems to only return it if it can find a '.' in the filename.
I.e. change
if (p) {
idx = p - ret;
add_assoc_stringl(tmp, "filename", ret, idx, 1);
}
to
idx = p ? (p - ret) : ret_len;
add_assoc_stringl(tmp, "filename", ret, idx, 1);
or something like that.
- Chris
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php