2
Test bindec() function : error conditions - incorrect input
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
11
* Pass incorrect input to bindec() to test behaviour
14
echo "*** Testing bindec() : error conditions ***\n";
21
echo "Incorrect number of arguments\n";
23
bindec('01010101111',true);
25
echo "Incorrect input\n";
29
*** Testing bindec() : error conditions ***
30
Incorrect number of arguments
32
Warning: bindec() expects exactly 1 parameter, 0 given in %s on line %d
34
Warning: bindec() expects exactly 1 parameter, 2 given in %s on line %d
37
Catchable fatal error: Object of class classA could not be converted to string in %s on line %d
b'\\ No newline at end of file'