1--TEST--
2Test lstat() and stat() functions: usage variations - invalid filenames
3--CREDITS--
4Dave Kelsey <d_kelsey@uk.ibm.com>
5--SKIPIF--
6<?php
7if (substr(PHP_OS, 0, 3) == 'WIN') {
8    die('skip ... not for Windows');
9}
10?>
11--CONFLICTS--
12obscure_filename
13--FILE--
14<?php
15/* Prototype: array lstat ( string $filename );
16   Description: Gives information about a file or symbolic link
17
18   Prototype: array stat ( string $filename );
19   Description: Gives information about a file
20*/
21echo "*** testing stat ***\n";
22var_dump(stat(NULL));
23var_dump(stat(false));
24var_dump(stat(''));
25var_dump(stat(' '));
26var_dump(stat('|'));
27
28echo "*** testing lstat ***\n";
29var_dump(lstat(NULL));
30var_dump(lstat(false));
31var_dump(lstat(''));
32var_dump(lstat(' '));
33var_dump(lstat('|'));
34?>
35--EXPECTF--
36*** testing stat ***
37bool(false)
38bool(false)
39bool(false)
40
41Warning: stat(): stat failed for   in %s on line %d
42bool(false)
43
44Warning: stat(): stat failed for | in %s on line %d
45bool(false)
46*** testing lstat ***
47bool(false)
48bool(false)
49bool(false)
50
51Warning: lstat(): Lstat failed for   in %s on line %d
52bool(false)
53
54Warning: lstat(): Lstat failed for | in %s on line %d
55bool(false)
56