3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "The time is over. # its mean I'm need to die. Please help me. # Ghost. I am here alone. Sorry. # help yourself."; function lines(string $str): generator { $hPos = strpos($str, "#"); if($hPos !== false) { $dPos = strpos($str, ".", $hPos); if($dPos !== false) { yield substr($str, $hPos + 1, $dPos - $hPos - 1); foreach(lines(substr($str, $dPos + 1)) as $line) { yield $line; } } } } foreach(lines($str) as $line) { printf("%s\n", $line); }
Output for git.master, git.master_jit, rfc.property-hooks
its mean I'm need to die Ghost help yourself

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