Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

mb_substitute_character

Description

The mb_substitute_character of Multibyte String for PHP set/Get substitution character.

Syntax

mb_substitute_character(
    string|int|null $substitute_character = null
): string|int|bool

Parameters

substitute_character

Specify the Unicode value as an int, or as one of the following strings:

StringDescription
noneNo output
longOutput character code value (Example: U+3000, JIS+7E7E)
entityOutput character entity (Example: Ȁ)

Return

If substitute_character is set, it returns true for success, otherwise returns false. If substitute_character is not set, it returns the current setting.

Examples

1 · void

<?

$return = mb_substitute_character();

echo $return;

?>
Array
(
    [0] => word1
    [1] => word2
    [2] => word3
    [3] => word4
    [4] => word5
)

2 · substitute_character · int

<?

$substitute_character = 65;

$return = mb_substitute_character($substitute_character);

var_export($return);

?>

3 · substitute_character · string · none

<?

$substitute_character = 'none';

$return = mb_substitute_character($substitute_character);

var_export($return);

?>
true

4 · substitute_character · string · long

<?

$substitute_character = 'long';

$return = mb_substitute_character($substitute_character);

var_export($return);

?>
true

5 · substitute_character · string · entity

<?

$substitute_character = 'entity';

$return = mb_substitute_character($substitute_character);

var_export($return);

?>
Array
(
    [0] => word1
)
HomeMenu