1--TEST--
2Test mb_substitute_character() function : error conditions
3--SKIPIF--
4<?php
5extension_loaded('mbstring') or die('skip');
6function_exists('mb_substitute_character') or die("skip mb_substitute_character() is not available in this build");
7?>
8--FILE--
9<?php
10/* Prototype  : mixed mb_substitute_character([mixed substchar])
11 * Description: Sets the current substitute_character or returns the current substitute_character
12 * Source code: ext/mbstring/mbstring.c
13 * Alias to functions:
14 */
15
16echo "*** Testing mb_substitute_character() : error conditions ***\n";
17
18
19//Test mb_substitute_character with one more than the expected number of arguments
20echo "\n-- Testing mb_substitute_character() function with more than expected no. of arguments --\n";
21$substchar = 1;
22$extra_arg = 10;
23var_dump( mb_substitute_character($substchar, $extra_arg) );
24
25?>
26===DONE===
27--EXPECTF--
28*** Testing mb_substitute_character() : error conditions ***
29
30-- Testing mb_substitute_character() function with more than expected no. of arguments --
31
32Warning: mb_substitute_character() expects at most 1 parameter, 2 given in %s on line %d
33NULL
34===DONE===
35