3v4l.org

run code in 300+ PHP versions simultaneously
<?php $exclude = 'BASE64,UUENCODE,HTML-ENTITIES,Quoted-Printable,' . '7bit,8bit,pass,wchar,byte2be,byte2le,byte4be,byte4le,' . 'UCS-4,UCS-4BE,UCS-4LE,UCS-2,UCS-2BE,UCS-2LE'; $prio = [ 'UTF-8', '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', 'ISO-8859-16', 'WINDOWS-1252', 'WINDOWS-1251', 'WINDOWS-1254', 'EUC-JP', 'EUC-TW', 'KOI8-R', 'BIG-5', 'ISO-2022-KR', 'ISO-2022-JP', 'GB18030', ]; $all_encodings = array_diff(mb_list_encodings(), explode(',', $exclude)); $encodings = array_unique(array_merge($prio, $all_encodings)); $test = 'Iksi' . chr(241) . 'ski'; echo mb_detect_encoding($test, $encodings);
Output for git.master, git.master_jit
SJIS-2004
Output for rfc.property-hooks
ISO-8859-1

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