3v4l.org

run code in 300+ PHP versions simultaneously
<?php $some_string = "ннннн ннннн"; $arra_c = array("ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256"); foreach($arra_c as $k => $v){ var_dump(iconv("UTF-8", $v, $some_string)); } var_dump(mb_detect_encoding($some_string)); var_dump(strlen(json_encode(array('message' => $some_string))));

preferences:
31.18 ms | 406 KiB | 5 Q