1--TEST-- 2Test mb_substitute_character() function : basic functionality 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() : basic functionality ***\n"; 17 18 19// Initialise all required variables 20var_dump( mb_substitute_character() ); 21var_dump( mb_substitute_character(66) ); 22var_dump( mb_substitute_character() ); 23var_dump( mb_substitute_character(1234) ); 24var_dump( mb_substitute_character() ); 25var_dump( mb_substitute_character("none") ); 26var_dump( mb_substitute_character() ); 27var_dump( mb_substitute_character("b") ); 28 29?> 30===DONE=== 31--EXPECTF-- 32*** Testing mb_substitute_character() : basic functionality *** 33int(63) 34bool(true) 35int(66) 36bool(true) 37int(1234) 38bool(true) 39string(4) "none" 40 41Warning: mb_substitute_character(): Unknown character. in %s on line %d 42bool(false) 43===DONE=== 44