1--TEST-- 2Test ctype_alnum() function : error conditions - Incorrect number of args 3--SKIPIF-- 4<?php require_once('skipif.inc'); ?> 5--FILE-- 6<?php 7/* Prototype : bool ctype_alnum(mixed $c) 8 * Description: Checks for alphanumeric character(s) 9 * Source code: ext/ctype/ctype.c 10 */ 11 12/* 13 * Pass incorrect number of arguments to ctype_alnum() to test behaviour 14 */ 15 16echo "*** Testing ctype_alnum() : error conditions ***\n"; 17 18$orig = setlocale(LC_CTYPE, "C"); 19 20// Zero arguments 21echo "\n-- Testing ctype_alnum() function with Zero arguments --\n"; 22var_dump( ctype_alnum() ); 23 24//Test ctype_alnum with one more than the expected number of arguments 25echo "\n-- Testing ctype_alnum() function with more than expected no. of arguments --\n"; 26$c = 1; 27$extra_arg = 10; 28var_dump( ctype_alnum($c, $extra_arg) ); 29 30setlocale(LC_CTYPE, $orig); 31?> 32===DONE=== 33--EXPECTF-- 34*** Testing ctype_alnum() : error conditions *** 35 36-- Testing ctype_alnum() function with Zero arguments -- 37 38Warning: ctype_alnum() expects exactly 1 parameter, 0 given in %s on line %d 39NULL 40 41-- Testing ctype_alnum() function with more than expected no. of arguments -- 42 43Warning: ctype_alnum() expects exactly 1 parameter, 2 given in %s on line %d 44NULL 45===DONE=== 46