filetype_error.phpt [plain text]
--TEST--
Test filetype() function: Error conditions
--FILE--
<?php
echo "*** Testing error conditions ***";
print( filetype("/no/such/file/dir") );
print( filetype("string") );
print( filetype(100) );
print( filetype() );
print( filetype("file", "file") );
echo "\n*** Done ***\n";
?>
--EXPECTF--
*** Testing error conditions ***
Warning: filetype(): Lstat failed for /no/such/file/dir in %s on line %d
Warning: filetype(): Lstat failed for string in %s on line %d
Warning: filetype(): Lstat failed for 100 in %s on line %d
Warning: filetype() expects exactly 1 parameter, 0 given in %s on line %d
Warning: filetype() expects exactly 1 parameter, 2 given in %s on line %d
*** Done ***