3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $s = "\xec\xe5\xf5\xe0\xed\xe8\xe7\xe8\xf0\xee\xe2\xe0\xed\xed\xe0\xff-\xf8\xf2\xf3\xea\xe0\xf2\xf3\xf0\xea\xe024.\xf0\xf4"; $s = "\xec\xe5\xf5\xe0\xed\xe8\xe7\xe8\xf0\xee\xe2\xe0\xed\xed\xe0\xff"; echo UConverter::transcode($s, 'UTF-16', 'UTF-8')."\n"; // echo iconv("UTF-8", "ISO-8859-1", $s); // echo $utf16_string; echo mb_convert_encoding($s, "UTF-8", "ISO-8859-1ISO-8859-1"); echo "\n"; var_dump(mb_detect_encoding($s)); echo "\n"; var_dump(mb_detect_encoding($s, ['ISO-8859-1', 'ISO-8859-5', 'UTF-8'])); echo "\n"; var_dump(mb_detect_encoding($s, ['ISO-8859-5', 'UTF-8', 'ISO-8859-1'])); echo "\n";
Output for git.master_jit, git.master
���������������������������������� Fatal error: Uncaught ValueError: mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "ISO-8859-1ISO-8859-1" in /in/6B0lo:9 Stack trace: #0 /in/6B0lo(9): mb_convert_encoding('\xEC\xE5\xF5\xE0\xED\xE8\xE7\xE8\xF0\xEE\xE2\xE0\xED\xED\xE0...', 'UTF-8', 'ISO-8859-1ISO-8...') #1 {main} thrown in /in/6B0lo 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:
29.82 ms | 406 KiB | 5 Q