3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = mb_convert_encoding("ア", 'JIS', 'UTF-8'); var_dump(mb_detect_encoding($str, 'JIS')); var_dump(mb_detect_encoding($str, 'JIS', true)); var_dump(mb_detect_encoding($str, 'JIS', false)); var_dump(mb_detect_encoding($str, 'ASCII')); var_dump(mb_detect_encoding($str, 'ASCII', true)); var_dump(mb_detect_encoding($str, 'ASCII', false)); var_dump(mb_detect_encoding($str, ['ASCII', 'JIS'])); var_dump(mb_detect_encoding($str, ['ASCII', 'JIS'], true)); var_dump(mb_detect_encoding($str, ['ASCII', 'JIS'], false));
Output for git.master, git.master_jit, rfc.property-hooks
string(3) "JIS" string(3) "JIS" string(3) "JIS" string(5) "ASCII" string(5) "ASCII" string(5) "ASCII" string(3) "JIS" string(3) "JIS" string(3) "JIS"

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:
72.42 ms | 405 KiB | 5 Q