1--TEST-- 2Test lstat() and stat() functions: error conditions 3--FILE-- 4<?php 5echo "*** Testing lstat() for error conditions ***\n"; 6$file_path = __DIR__; 7var_dump( lstat("$file_path/temp.tmp") ); // non existing file 8var_dump( lstat(22) ); // scalar argument 9 10echo "\n*** Testing stat() for error conditions ***\n"; 11 12var_dump( stat("$file_path/temp.tmp") ); // non existing file 13var_dump( stat("$file_path/temp/") ); // non existing dir 14var_dump( stat(22) ); // scalar argument 15 16echo "Done\n"; 17?> 18--EXPECTF-- 19*** Testing lstat() for error conditions *** 20 21Warning: lstat(): Lstat failed for %s in %s on line %d 22bool(false) 23 24Warning: lstat(): Lstat failed for 22 in %s on line %d 25bool(false) 26 27*** Testing stat() for error conditions *** 28 29Warning: stat(): stat failed for %s in %s on line %d 30bool(false) 31 32Warning: stat(): stat failed for %s in %s on line %d 33bool(false) 34 35Warning: stat(): stat failed for 22 in %s on line %d 36bool(false) 37Done 38