1--TEST-- 2Test base_convert() function : error conditions - incorrect input 3--FILE-- 4<?php 5/* Prototype : string base_convert ( string $number , int $frombase , int $tobase ) 6 * Description: Convert a number between arbitrary bases. 7 * Source code: ext/standard/math.c 8 */ 9 10echo "*** Testing base_convert() : error conditions ***\n"; 11 12// get a class 13class classA 14{ 15} 16 17echo "Incorrect number of arguments\n"; 18base_convert(); 19base_convert(35); 20base_convert(35,2); 21base_convert(1234, 1, 10); 22base_convert(1234, 10, 37); 23 24echo "Incorrect input\n"; 25base_convert(new classA(), 8, 10); 26 27?> 28--EXPECTF-- 29*** Testing base_convert() : error conditions *** 30Incorrect number of arguments 31 32Warning: base_convert() expects exactly 3 parameters, 0 given in %s on line %d 33 34Warning: base_convert() expects exactly 3 parameters, 1 given in %s on line %d 35 36Warning: base_convert() expects exactly 3 parameters, 2 given in %s on line %d 37 38Warning: base_convert(): Invalid `from base' (1) in %s on line %d 39 40Warning: base_convert(): Invalid `to base' (37) in %s on line %s 41Incorrect input 42 43Recoverable fatal error: Object of class classA could not be converted to string in %s on line %d 44