3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $some_string = "Ку ку"; $arra_c = array("ASCII//IGNORE", "Windows-1252//IGNORE", "ISO-8859-15//IGNORE", "ISO-8859-1//IGNORE", "ISO-8859-6//IGNORE", "CP1256//IGNORE"); 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 5.2.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: mb_convert_encoding(): Unknown encoding "ASCII//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "Windows-1252//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-15//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-1//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-6//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "CP1256//IGNORE" in /in/OEk9F on line 9 bool(false) string(5) "UTF-8" int(39)
Output for hhvm-3.10.0 - 3.12.0
Warning: Unknown encoding "ASCII//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: Unknown encoding "Windows-1252//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: Unknown encoding "ISO-8859-15//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: Unknown encoding "ISO-8859-1//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: Unknown encoding "ISO-8859-6//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: Unknown encoding "CP1256//IGNORE" in /in/OEk9F on line 9 bool(false) string(5) "UTF-8" int(39)
Output for 5.0.0 - 5.1.6
Warning: mb_convert_encoding(): Unknown encoding "ASCII//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "Windows-1252//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-15//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-1//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-6//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "CP1256//IGNORE" in /in/OEk9F on line 9 bool(false) string(5) "UTF-8" Fatal error: Call to undefined function json_encode() in /in/OEk9F on line 16
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: mb_convert_encoding(): Unknown encoding "ASCII//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "Windows-1252//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-15//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-1//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-6//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "CP1256//IGNORE" in /in/OEk9F on line 9 bool(false) string(5) "UTF-8" Fatal error: Call to undefined function: json_encode() in /in/OEk9F on line 16
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Warning: mb_convert_encoding(): Unknown encoding "ASCII//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "Windows-1252//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-15//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-1//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "ISO-8859-6//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding(): Unknown encoding "CP1256//IGNORE" in /in/OEk9F on line 9 bool(false) string(5) "UTF-8" Fatal error: Call to undefined function: json_encode() in /in/OEk9F on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: mb_convert_encoding() [http://www.php.net/function.mb-convert-encoding]: Unknown encoding "ASCII//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding() [http://www.php.net/function.mb-convert-encoding]: Unknown encoding "Windows-1252//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding() [http://www.php.net/function.mb-convert-encoding]: Unknown encoding "ISO-8859-15//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding() [http://www.php.net/function.mb-convert-encoding]: Unknown encoding "ISO-8859-1//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding() [http://www.php.net/function.mb-convert-encoding]: Unknown encoding "ISO-8859-6//IGNORE" in /in/OEk9F on line 9 bool(false) Warning: mb_convert_encoding() [http://www.php.net/function.mb-convert-encoding]: Unknown encoding "CP1256//IGNORE" in /in/OEk9F on line 9 bool(false) string(5) "UTF-8" Fatal error: Call to undefined function: json_encode() in /in/OEk9F on line 16