3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "ABC01 ABC02 ABC03 ABC04 ABC05 ABC06 "; $text = explode("\n",str_replace("\r", "", $text)); $text = array_filter($text, 'trim'); $key = array_search("ABC04", $text); $text[$key-1] .= " - " . $text[$key]; Unset($text[$key]); Echo implode("<br>\n", $text);
Output for git.master, git.master_jit, rfc.property-hooks
ABC01<br> ABC02<br> ABC03 - ABC04<br> ABC05<br> ABC06

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:
130.93 ms | 405 KiB | 5 Q