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

mb_regex_encoding

Description

The mb_regex_encoding of Multibyte String for PHP set/Get character encoding for multibyte regex.

Syntax

mb_regex_encoding(
    ?string $encoding = null
): string|bool

Parameters

encoding

The encoding parameter is the character encoding. If it is omitted or null, the internal character encoding value will be used.

Return

If encoding is set, then returns true on success or false on failure. In this case, the internal character encoding is NOT changed. If encoding is omitted, then the current character encoding name for a multibyte regex is returned.

Examples

1 · void

<?

$return = mb_regex_encoding();

echo $return;

?>
UTF-8

2 · encoding

<?

$encoding = 'UTF-8';

$return = mb_regex_encoding($encoding);

var_export($return);

?>
true
HomeMenu