1--TEST-- 2Test gd_info() function : error conditions - with more than expected number of arguments 3--SKIPIF-- 4<?php 5if(!extension_loaded('gd')) { 6 die('skip gd extension is not loaded'); 7} 8if(!function_exists('gd_info')) { 9 die('skip gd_info function is not available'); 10} 11?> 12--FILE-- 13<?php 14/* Prototype : array gd_info() 15 * Description: Retrieve information about the currently installed GD library 16 * Source code: ext/gd/gd.c 17 */ 18$extra_arg_number = 10; 19$extra_arg_string = "Hello"; 20 21echo "*** Testing gd_info() : error conditions ***\n"; 22 23echo "\n-- Testing gd_info() function with more than expected number of arguments --\n"; 24var_dump(gd_info($extra_arg_number)); 25var_dump(gd_info($extra_arg_string, $extra_arg_number)); 26?> 27===DONE=== 28--EXPECTF-- 29*** Testing gd_info() : error conditions *** 30 31-- Testing gd_info() function with more than expected number of arguments -- 32 33Warning: gd_info() expects exactly 0 parameters, 1 given in %s on line %d 34bool(false) 35 36Warning: gd_info() expects exactly 0 parameters, 2 given in %s on line %d 37bool(false) 38===DONE===