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(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(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" string(5) "?? ??" Fatal error: Uncaught ValueError: mb_convert_encoding(): Argument #2 ($to_encoding) must be a valid encoding, "CP1256" given in /in/NnVAu:9 Stack trace: #0 /in/NnVAu(9): mb_convert_encoding('\xD0\x9A\xD1\x83 \xD0\xBA\xD1\x83', 'CP1256', 'UTF-8') #1 {main} thrown in /in/NnVAu on line 9
Process exited with code 255.

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:
47.2 ms | 401 KiB | 8 Q