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