1--TEST--
2Test dirname() function : usage variations
3--SKIPIF--
4<?php
5if((substr(PHP_OS, 0, 3) == "WIN"))
6  die('skip not for Windows');
7?>
8--FILE--
9<?php
10/* Prototype: string dirname ( string $path [, int nb]);
11   Description: Returns directory name component of path.
12*/
13for ($i=0 ; $i<5 ; $i++) {
14	var_dump(dirname("/foo/bar/baz", $i));
15}
16var_dump(dirname("/foo/bar/baz", PHP_INT_MAX));
17?>
18Done
19--EXPECTF--
20Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi.php on line %d
21NULL
22string(8) "/foo/bar"
23string(4) "/foo"
24string(1) "/"
25string(1) "/"
26string(1) "/"
27Done
28