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

mb_http_input

Description

Detect HTTP input character encoding

Syntax

mb_http_input(
    ?string $type = null
): array|string|false

Parameters

type

Input string specifies the input type. If type is omitted, it returns the last input type processed.

TypeDescription
GGET
PPOST
CCOOKIE
Sstring
Llist
Iwhole list (array)

Return

The character encoding name, as per the type, or an array of character encoding names, if type is "I". If mb_http_input() does not process specified HTTP input, it returns false.

Examples

1 · void

<?

$return = mb_http_input();

var_export($return);

?>
false

2 · type · G

<?

$type = "G";

$return = mb_http_input($type);

var_export($return);

?>
false

3 · type · P

<?

$type = "P";

$return = mb_http_input($type);

var_export($return);

?>
false

4 · type · C

<?

$type = "C";

$return = mb_http_input($type);

var_export($return);

?>
false

5 · type · S

<?

$type = "S";

$return = mb_http_input($type);

var_export($return);

?>
false

6 · type · L

<?

$type = "L";

$return = mb_http_input($type);

var_export($return);

?>
'UTF-8'

7 · type · I

<?

$type = "I";

$return = mb_http_input($type);

var_export($return);

?>
array (
  0 => 'UTF-8',
)
HomeMenu