summaryrefslogtreecommitdiff
path: root/ext/standard/tests/strings/basename_invalid_path.phpt
blob: db0130c2a2d955d201c51a5cf1474820291cbc37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Test basename() function : usage variations with invalid paths
--SKIPIF--
<?php
if((substr(PHP_OS, 0, 3) == "WIN"))
  die('skip not for Windows"');
?>
--FILE--
<?php
/* Prototype: string basename ( string $path [, string $suffix] );
   Description: Given a string containing a path to a file,
                this function will return the base name of the file.
                If the filename ends in suffix this will also be cut off.
*/

var_dump(basename(chr(-1)));

echo "Done\n";

--EXPECTF--
string(0) ""
Done