Description
The following code:
<?php
$strings = ['bl', 'Bl', 'Blog'];
foreach ($strings as &$str) {
$str = mb_convert_encoding($str, 'UTF-8', mb_list_encodings());
}
echo '<pre>' . print_r($strings, true) . '</pre>';
Resulted in this output:
Array
(
[0] => 扬
[1] => 求
[2] => 求杯
)
But I expected this output instead:
Array
(
[0] => bl
[1] => Bl
[2] => Blog
)
PHP Version
PHP 8.1.8
Operating System
No response