mirror of
https://github.com/php/php-src.git
synced 2026-04-19 14:01:01 +02:00
"pass" is not a real encoding, it just means "don't perform any conversion". Using it as an internal encoding or passing it to any of the mbstring() function will not work (and on master commonly assert).
29 lines
634 B
PHP
29 lines
634 B
PHP
--TEST--
|
||
mb_http_input() with pass encoding
|
||
--SKIPIF--
|
||
<?php
|
||
extension_loaded('mbstring') or die('skip mbstring not available');
|
||
?>
|
||
--POST--
|
||
a=ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
--GET--
|
||
b=ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
--INI--
|
||
mbstring.encoding_translation=1
|
||
input_encoding=pass
|
||
--FILE--
|
||
<?php
|
||
|
||
echo $_POST['a']."\n";
|
||
echo $_GET['b']."\n";
|
||
|
||
// Get encoding
|
||
$enc = mb_http_input('P');
|
||
var_dump($enc);
|
||
|
||
?>
|
||
--EXPECT--
|
||
ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
ÆüËܸì0123456789ÆüËܸ쥫¥¿¥«¥Ê¤Ò¤é¤¬¤Ê
|
||
string(4) "pass"
|