3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Enter your code here, enjoy! $array = ['a', '๐Ÿ‘', '๐Ÿคก', '๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ', '๐Ÿ‘ฉโ€๐Ÿ’ป']; foreach ($array as $string) { echo $string; echo ' - '; echo strlen($string); echo ' - '; echo mb_strlen($string); echo ' - '; $utf16String = mb_convert_encoding($string, 'UTF-16', 'UTF-8'); echo strlen($utf16String) / 2; echo PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
a - 1 - 1 - 1 ๐Ÿ‘ - 4 - 1 - 2 ๐Ÿคก - 4 - 1 - 2 ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ - 25 - 7 - 11 ๐Ÿ‘ฉโ€๐Ÿ’ป - 11 - 3 - 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:
32.29 ms | 401 KiB | 8 Q