2 Test chr() function : error conditions
6 /* Prototype : string chr ( int $ascii )
7 * Description: Return a specific character
8 * Source code: ext/standard/string.c
11 echo "*** Testing chr() : error conditions ***\n";
13 echo "\n-- Testing chr() function with no arguments --\n";
16 } catch (TypeError $e) {
17 echo $e->getMessage(), "\n";
20 echo "\n-- Testing chr() function with more than expected no. of arguments --\n";
23 var_dump( chr(72, $extra_arg) );
24 } catch (TypeError $e) {
25 echo $e->getMessage(), "\n";
30 *** Testing chr() : error conditions ***
32 -- Testing chr() function with no arguments --
33 chr() expects exactly 1 parameter, 0 given
35 -- Testing chr() function with more than expected no. of arguments --
36 chr() expects exactly 1 parameter, 2 given