php-src/ext/mbstring/tests/mb_parse_str_error.phpt
Alex Dowad aeccb139c3 Use new encoding conversion filters for mb_parse_str and php_mb_post_handler
When micro-benchmarking on relatively short ASCII strings, the new
implementation was about 30% faster than the old one.
2022-08-16 16:43:26 +02:00

30 lines
447 B
PHP

--TEST--
mb_parse_str() error handling
--EXTENSIONS--
mbstring
--FILE--
<?php
mb_internal_encoding('UTF-8');
$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