diff options
Diffstat (limited to 'ext/standard/tests/strings/chr_error.phpt')
-rw-r--r-- | ext/standard/tests/strings/chr_error.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/standard/tests/strings/chr_error.phpt b/ext/standard/tests/strings/chr_error.phpt new file mode 100644 index 0000000..d5fb974 --- /dev/null +++ b/ext/standard/tests/strings/chr_error.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test chr() function : error conditions +--FILE-- +<?php + +/* Prototype : string chr ( int $ascii ) + * Description: Return a specific character + * Source code: ext/standard/string.c +*/ + +echo "*** Testing chr() : error conditions ***\n"; + +echo "\n-- Testing chr() function with no arguments --\n"; +var_dump( chr() ); + +echo "\n-- Testing chr() function with more than expected no. of arguments --\n"; +$extra_arg = 10; +var_dump( chr(72, $extra_arg) ); + +?> +===DONE=== +--EXPECTF-- +*** Testing chr() : error conditions *** + +-- Testing chr() function with no arguments -- + +Warning: Wrong parameter count for chr() in %s on line %d +NULL + +-- Testing chr() function with more than expected no. of arguments -- + +Warning: Wrong parameter count for chr() in %s on line %d +NULL +===DONE=== |