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--FILE--
11<?php
12/* Prototype: array lstat ( string $filename );
13   Description: Gives information about a file or symbolic link
14
15   Prototype: array stat ( string $filename );
16   Description: Gives information about a file
17*/
18echo "*** testing stat ***\n";
19var_dump(stat(NULL));
20var_dump(stat(false));
21var_dump(stat(''));
22var_dump(stat(' '));
23var_dump(stat('|'));
24
25echo "*** testing lstat ***\n";
26var_dump(lstat(NULL));
27var_dump(lstat(false));
28var_dump(lstat(''));
29var_dump(lstat(' '));
30var_dump(lstat('|'));
31echo "Done";
32?>
33--EXPECTF--
34*** testing stat ***
35bool(false)
36bool(false)
37bool(false)
38
39Warning: stat(): stat failed for   in %s on line %d
40bool(false)
41
42Warning: stat(): stat failed for | in %s on line %d
43bool(false)
44*** testing lstat ***
45bool(false)
46bool(false)
47bool(false)
48
49Warning: lstat(): Lstat failed for   in %s on line %d
50bool(false)
51
52Warning: lstat(): Lstat failed for | in %s on line %d
53bool(false)
54Done
55