1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/mbstring/tests/mb_parse_str_error.phpt
Jorg Adam Sowa 1e02099e6a ext/mbstring: Use internal_encoding INI setting instead of mb_internal_encoding() in tests (#19663)
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.
2025-09-03 11:34:12 +01:00

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