3v4l.org

run code in 300+ PHP versions simultaneously
<?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>';
Output for 8.1.2 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
<pre>Array ( [0] => 扬 [1] => 求 [2] => 求杯 ) </pre>
Output for 8.1.0 - 8.1.1
<pre>Array ( [0] => [1] => [2] => ) </pre>
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30
<pre>Array ( [0] => bl [1] => Bl [2] => Blog ) </pre>

preferences:
58.42 ms | 408 KiB | 5 Q