1--TEST-- 2Test file_exists() function : error conditions 3--CREDITS-- 4Dave Kelsey <d_kelsey@uk.ibm.com> 5--FILE-- 6<?php 7/* Prototype : proto bool file_exists(string filename) 8 * Description: Returns true if filename exists 9 * Source code: ext/standard/filestat.c 10 * Alias to functions: 11 */ 12 13echo "*** Testing file_exists() : error conditions ***\n"; 14 15// Zero arguments 16echo "\n-- Testing file_exists() function with Zero arguments --\n"; 17var_dump( file_exists() ); 18 19//Test file_exists with one more than the expected number of arguments 20echo "\n-- Testing file_exists() function with more than expected no. of arguments --\n"; 21$filename = 'string_val'; 22$extra_arg = 10; 23var_dump( file_exists($filename, $extra_arg) ); 24 25echo "Done"; 26?> 27--EXPECTF-- 28*** Testing file_exists() : error conditions *** 29 30-- Testing file_exists() function with Zero arguments -- 31 32Warning: file_exists() expects exactly 1 parameter, 0 given in %s on line %d 33NULL 34 35-- Testing file_exists() function with more than expected no. of arguments -- 36 37Warning: file_exists() expects exactly 1 parameter, 2 given in %s on line %d 38NULL 39Done 40 41