3v4l.org

run code in 300+ PHP versions simultaneously
<?php $some_string = "Ку ку"; $arra_c = array("UCS-4", "UCS-4BE", "UCS-4LE", "UCS-2", "UCS-2BE", "UCS-2LE", "UTF-32", "UTF-32BE", "UTF-32LE", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-7", "UTF7-IMAP", "UTF-8", "ASCII", "EUC-JP", "SJIS", "eucJP-win", "SJIS-win", "ISO-2022-JP", "ISO-2022-JP-MS", "CP932", "CP51932", "SJIS-mac", "SJIS-Mobile#DOCOMO", "SJIS-Mobile#KDDI", "SJIS-Mobile#SOFTBANK", "UTF-8-Mobile#DOCOMO", "UTF-8-Mobile#KDDI-A", "UTF-8-Mobile#KDDI-B", "UTF-8-Mobile#SOFTBANK", "ISO-2022-JP-MOBILE#KDDI", "JIS", "JIS-ms", "CP50220", "CP50220raw", "CP50221", "CP50222", "ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "ISO-8859-5", "ISO-8859-6", "ISO-8859-7", "ISO-8859-8", "ISO-8859-9", "ISO-8859-10", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "byte2be", "byte2le", "byte4be", "byte4le", "BASE64", "HTML-ENTITIES", "7bit", "8bit", "EUC-CN", "CP936", "GB18030", "HZ", "EUC-TW", "CP950", "BIG-5", "EUC-KR", "UHC",// (CP949) "ISO-2022-KR", "Windows-1251",// (CP1251) "Windows-1252",// (CP1252) "CP866",// (IBM866) "KOI8-R"); foreach($arra_c as $k => $v){ var_dump(mb_convert_encoding($some_string,$v,"UTF-8" )); } //var_dump(mb_detect_encoding($some_string)); //var_dump(strlen(json_encode(array('message' => $some_string))));
Output for git.master, git.master_jit, rfc.property-hooks
string(20) "C :C" string(20) "C :C" string(20) "C :C" string(10) "C :C" string(10) "C :C" string(10) "C :C" string(20) "C :C" string(20) "C :C" string(20) "C :C" string(10) "C :C" string(10) "C :C" string(10) "C :C" string(16) "+BBoEQw +BDoEQw-" string(17) "&BBoEQw- &BDoEQw-" string(9) "Ку ку" string(5) "?? ??" string(9) "���� �ܧ�" string(9) "�K�� �{��" string(9) "���� �ܧ�" string(9) "�K�� �{��" string(21) "$B','e(B $B'\'e(B" string(21) "$B','e(B $B'\'e(B" string(9) "�K�� �{��" string(9) "���� �ܧ�" string(9) "�K�� �{��" string(9) "�K�� �{��" string(9) "�K�� �{��" string(9) "�K�� �{��" string(9) "Ку ку" string(9) "Ку ку" string(9) "Ку ку" string(9) "Ку ку" string(21) "$B','e(B $B'\'e(B" string(21) "$B','e(B $B'\'e(B" string(21) "$B','e(B $B'\'e(B" string(21) "$B','e(B $B'\'e(B" string(21) "$B','e(B $B'\'e(B" string(21) "$B','e(B $B'\'e(B" string(21) "$B','e(B $B'\'e(B" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "�� ��" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(10) "C :C" string(10) "C :C" string(20) "C :C" string(20) "C :C" Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/base64_decode instead in /in/dZno3 on line 82 string(12) "0JrRgyDQutGD" Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /in/dZno3 on line 82 string(29) "&#1050;&#1091; &#1082;&#1091;" string(5) "?? ??" string(5) "?? ??" string(9) "���� �ܧ�" string(9) "���� �ܧ�" string(9) "���� �ܧ�" string(17) "~{','e~} ~{'\'e~}" string(5) "?? ??" string(5) "?? ??" string(9) "Ǹ�� ����" string(9) "���� �ܬ�" string(9) "���� �ܬ�" string(17) "$)C,,,e ,\,e" string(5) "�� ��" string(5) "?? ??" string(5) "�� ��" string(5) "�� ��"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.29 ms | 409 KiB | 8 Q