3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = '14'; $str2 = 'DQ'; $encodings1 = ['ASCII', 'UTF-8', 'UTF-16', 'UTF-16LE']; $encodings2 = ['UTF-8', 'UTF-16', 'UTF-16LE']; echo bin2hex($str1) . ' - ' . mb_detect_encoding($str1, $encodings1, true)."\n"; echo bin2hex($str1) . ' - ' . mb_detect_encoding($str1, $encodings2, true)."\n"; echo bin2hex($str2) . ' - ' . mb_detect_encoding($str2, $encodings1, true)."\n"; echo bin2hex($str2) . ' - ' . mb_detect_encoding($str2, $encodings2, true)."\n";
Output for git.master, git.master_jit, rfc.property-hooks
3134 - UTF-16 3134 - UTF-16 4451 - UTF-16LE 4451 - UTF-16LE

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