3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(mb_strlen(iconv('utf-8', 'utf-16le', 'A B C')) / 2); # correct var_dump(mb_strlen(iconv('utf-8', 'utf-16le', '🎖')) / 2); # correct var_dump(bin2hex(mb_convert_encoding('A B C', 'UTF-32BE', 'UTF-8'))); # off by 5 chars var_dump(mb_strlen(mb_convert_encoding('🎖', 'UTF-32BE', 'UTF-8')) / 2); # correct
Output for git.master_jit, git.master, rfc.property-hooks
Warning: iconv(): Wrong encoding, conversion from "utf-8" to "utf-16le" is not allowed in /in/8KfQF on line 4 int(0) Warning: iconv(): Wrong encoding, conversion from "utf-8" to "utf-16le" is not allowed in /in/8KfQF on line 5 int(0) string(40) "0000004100000020000000420000002000000043" float(1.5)

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