1--TEST-- 2basename bug #66395 check drive traversing and NTFS streams 3--SKIPIF-- 4<?php if (substr(PHP_OS, 0, 3) != 'WIN') { die('skip Windows only basename tests'); } ?> 5--FILE-- 6<?php 7echo basename("y:") . "\n"; 8echo basename("y:/") . "\n"; 9echo basename("notdriveletter:file.txt") . "\n"; 10echo basename("a:\\b:c:d:hello.txt\\hcd:c.txt") . "\n"; 11echo basename("a:b:c:d:hello.txt\\d:some.txt") . "\n"; 12echo basename("a:b:c:d:hello\world\a.bmp\c:d:e:f.txt") . "\n"; 13echo basename("a:\\b:\\c:d:hello\\world\\a.bmp\\d:e:f:g.txt") . "\n"; 14echo basename("a:\\b:\\c:d:hello/world\\a.bmp\\d:\\e:\\f:g.txt") . "\n"; 15echo basename("a:\\b:/c:d:hello\\world:somestream") . "\n"; 16echo basename("a:\\b:\\c:d:hello\\world:some.stream") . "\n"; 17echo basename("a:/b:\\c:d:hello\\world:some.stream:\$DATA") . "\n"; 18echo basename("x:y:z:hello\world:my.stream:\$DATA") . "\n"; 19echo basename("a:\\b:\\c:d:hello\\world:c:\$DATA") . "\n"; 20echo basename("a:\\b:\\c:d:hello\\d:world:c:\$DATA") . "\n"; 21?> 22==DONE== 23--EXPECT-- 24y 25y 26notdriveletter:file.txt 27hcd:c.txt 28some.txt 29f.txt 30g.txt 31g.txt 32world:somestream 33world:some.stream 34world:some.stream:$DATA 35world:my.stream:$DATA 36world:c:$DATA 37world:c:$DATA 38==DONE== 39