1--TEST--
2Test dirname() function : usage variations
3--SKIPIF--
4<?php
5if((substr(PHP_OS, 0, 3) != "WIN"))
6  die('skip Windows only');
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));
17var_dump(dirname("g:/foo/bar/baz", PHP_INT_MAX));
18var_dump(dirname("g:foo/bar/baz", PHP_INT_MAX));
19?>
20Done
21--EXPECTF--
22Warning: dirname(): Invalid argument, levels must be >= 1 in %sdirname_multi_win.php on line %d
23NULL
24string(8) "/foo/bar"
25string(4) "/foo"
26string(1) "\"
27string(1) "\"
28string(1) "\"
29string(3) "g:\"
30string(3) "g:."
31Done
32