mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
Moves the usage of `mb_internal_encoding()` to INI section for the tests not testing the encoding/function itself, but the other mbstring/iconv functions.
32 lines
448 B
PHP
32 lines
448 B
PHP
--TEST--
|
|
mb_parse_str() error handling
|
|
--EXTENSIONS--
|
|
mbstring
|
|
--INI--
|
|
internal_encoding=UTF-8
|
|
--FILE--
|
|
<?php
|
|
|
|
$queries = array(
|
|
"\x80\x80\x80",
|
|
"\xFF=\xFF"
|
|
);
|
|
|
|
foreach ($queries as $query) {
|
|
echo "Query: " . bin2hex($query) . "\n";
|
|
|
|
$array = [];
|
|
mb_parse_str($query, $array);
|
|
|
|
foreach ($array as $key => $value) {
|
|
echo bin2hex($key) . "=>" . bin2hex($value) . "\n";
|
|
}
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Query: 808080
|
|
3f3f3f=>
|
|
Query: ff3dff
|
|
3f=>3f
|