3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encode($str) { $str = mb_convert_encoding($str , 'UTF-32', 'UTF-8'); //big endian $split = str_split($str, 4); $res = ""; foreach ($split as $c) { $cur = 0; for ($i = 0; $i < 4; $i++) { $cur |= ord($c[$i]) << (8*(3 - $i)); } $res .= "&#" . $cur . ";"; } return $res; } echo encode("liisa.vahakyla@finnanimation.fi");
Output for git.master, git.master_jit, rfc.property-hooks
&#108;&#105;&#105;&#115;&#97;&#46;&#118;&#97;&#104;&#97;&#107;&#121;&#108;&#97;&#64;&#102;&#105;&#110;&#110;&#97;&#110;&#105;&#109;&#97;&#116;&#105;&#111;&#110;&#46;&#102;&#105;

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