mirror of
https://github.com/php/php-src.git
synced 2025-08-21 01:45:16 +02:00

This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
44 lines
945 B
PHP
44 lines
945 B
PHP
--TEST--
|
||
mb_http_input()
|
||
--EXTENSIONS--
|
||
mbstring
|
||
--POST--
|
||
a=ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
--GET--
|
||
b=ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
--INI--
|
||
mbstring.encoding_translation=1
|
||
input_encoding=latin1
|
||
--FILE--
|
||
<?php
|
||
|
||
echo $_POST['a']."\n";
|
||
echo $_GET['b']."\n";
|
||
|
||
// Get encoding
|
||
var_dump(mb_http_input('P'));
|
||
var_dump(mb_http_input('G'));
|
||
var_dump(mb_http_input('C'));
|
||
var_dump(mb_http_input('S'));
|
||
var_dump(mb_http_input('I'));
|
||
var_dump(mb_http_input('L'));
|
||
try {
|
||
var_dump(mb_http_input('Q'));
|
||
} catch (ValueError $e) {
|
||
echo $e->getMessage(), "\n";
|
||
}
|
||
|
||
?>
|
||
--EXPECT--
|
||
ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
string(10) "ISO-8859-1"
|
||
string(10) "ISO-8859-1"
|
||
bool(false)
|
||
bool(false)
|
||
array(1) {
|
||
[0]=>
|
||
string(10) "ISO-8859-1"
|
||
}
|
||
string(10) "ISO-8859-1"
|
||
mb_http_input(): Argument #1 ($type) must be one of "G", "P", "C", "S", "I", or "L"
|