1--TEST-- 2Test is_dir() function: error conditions 3--FILE-- 4<?php 5/* Prototype: bool is_dir ( string $filename ); 6 * Description: Tells whether the filename is a regular file 7 * Returns TRUE if the filename exists and is a regular file 8 */ 9 10echo "*** Testing is_dir() error conditions ***"; 11var_dump( is_dir() ); // Zero No. of args 12 13$dir_name = dirname(__FILE__)."/is_dir_error"; 14mkdir($dir_name); 15var_dump( is_dir($dir_name, "is_dir_error1") ); // args > expected no.of args 16 17/* Non-existing dir */ 18var_dump( is_dir("/no/such/dir") ); 19 20echo "*** Done ***"; 21?> 22--CLEAN-- 23<?php 24rmdir(dirname(__FILE__)."/is_dir_error"); 25?> 26--EXPECTF-- 27*** Testing is_dir() error conditions *** 28Warning: is_dir() expects exactly 1 parameter, 0 given in %s on line %d 29NULL 30 31Warning: is_dir() expects exactly 1 parameter, 2 given in %s on line %d 32NULL 33bool(false) 34*** Done *** 35