Annotation of embedaddon/php/ext/standard/tests/file/filesize_variation5.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test filesize() function: usage variations - size of files
3: --CREDITS--
4: Dave Kelsey <d_kelsey@uk.ibm.com>
5: --FILE--
6: <?php
7: /*
8: * Prototype : int filesize ( string $filename );
9: * Description : Returns the size of the file in bytes, or FALSE
10: * (and generates an error of level E_WARNING) in case of an error.
11: */
12:
13: echo "*** Testing filesize(): usage variations ***\n";
14:
15: /* null, false, "", " " */
16: var_dump( filesize(NULL) );
17: var_dump( filesize(false) );
18: var_dump( filesize('') );
19: var_dump( filesize(' ') );
20: var_dump( filesize('|') );
21: echo "*** Done ***\n";
22: ?>
23: --EXPECTF--
24: *** Testing filesize(): usage variations ***
25: bool(false)
26: bool(false)
27: bool(false)
28:
29: Warning: filesize(): stat failed for in %s on line %d
30: bool(false)
31:
32: Warning: filesize(): stat failed for | in %s on line %d
33: bool(false)
34: *** Done ***
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>