3v4l.org

run code in 300+ PHP versions simultaneously
<?php class štring { static function kek($str): Generator { for ($i = 0, $len = mb_strlen($str); $i < $len; ++$i) { yield mb_substr($str, $i, 1); } } } foreach (štring::kek("meh") as $char) { var_dump($char); } var_dump(štring::kek("meh"));
Output for git.master_jit, git.master, rfc.property-hooks
string(1) "m" string(1) "e" string(1) "h" object(Generator)#2 (0) { }

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