1--TEST-- 2Test hexdec() - wrong params test hexdec() 3--FILE-- 4<?php 5/* Prototype : number hexdec ( string $hex_string ) 6 * Description: Returns the decimal equivalent of the hexadecimal number represented by the hex_string argument. 7 * Source code: ext/standard/math.c 8 */ 9 10echo "*** Testing hexdec() : error conditions ***\n"; 11 12// get a class 13class classA 14{ 15} 16 17echo "\n-- Incorrect number of arguments --\n"; 18hexdec(); 19hexdec('0x123abc',true); 20 21echo "\n-- Incorrect input --\n"; 22hexdec(new classA()); 23 24?> 25--EXPECTF-- 26*** Testing hexdec() : error conditions *** 27 28-- Incorrect number of arguments -- 29 30Warning: hexdec() expects exactly 1 parameter, 0 given in %s on line %d 31 32Warning: hexdec() expects exactly 1 parameter, 2 given in %s on line %d 33 34-- Incorrect input -- 35 36Catchable fatal error: Object of class classA could not be converted to string in %s on line %d