From: nagger at gmx dot de
Operating system: WinXP
PHP version: 4.3.2
PHP Bug Type: Filesystem function related
Bug description: basename with / and \
Description:
------------
on WinXP basename() fails if there are slashes *and* backslashes in path:
basename('foo/bla\bar') is 'bla\bar' instead of 'bar'
dirname('foo/bla\bar') is 'foo/bla' -> correct
Reproduce code:
---------------
echo basename('foo/bla/bar');
echo basename('foo\bla\bar');
echo basename('foo/bla\bar'); //this fails
echo basename('foo\bla/bar');
echo dirname('foo/bla/bar');
echo dirname('foo\bla\bar');
echo dirname('foo/bla\bar');
echo dirname('foo\bla/bar');
Expected result:
----------------
bar
bar
bla\bar
bar
foo/bla
foo\bla
foo/bla
foo\bla
Actual result:
--------------
bar
bar
bar
bar
foo/bla
foo\bla
foo/bla
foo\bla
--
Edit bug report at http://bugs.php.net/?id=24340&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24340&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24340&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24340&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24340&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24340&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24340&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24340&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24340&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24340&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24340&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24340&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24340&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24340&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24340&r=gnused