1--TEST--
2Test chr() function : error conditions
3--FILE--
4<?php
5
6echo "*** Testing chr() : error conditions ***\n";
7
8echo "\n-- Testing chr() function with no arguments --\n";
9try {
10    var_dump( chr() );
11} catch (TypeError $e) {
12    echo $e->getMessage(), "\n";
13}
14
15echo "\n-- Testing chr() function with more than expected no. of arguments --\n";
16$extra_arg = 10;
17try {
18    var_dump( chr(72, $extra_arg) );
19} catch (TypeError $e) {
20    echo $e->getMessage(), "\n";
21}
22
23?>
24--EXPECT--
25*** Testing chr() : error conditions ***
26
27-- Testing chr() function with no arguments --
28chr() expects exactly 1 argument, 0 given
29
30-- Testing chr() function with more than expected no. of arguments --
31chr() expects exactly 1 argument, 2 given
32