3v4l.org

run code in 300+ PHP versions simultaneously
<?php // let's say I want to add "Has" at beginning (if doesn't exist) $string_1 = "AnaHasSomeApples"; // we need to add $string_2 = "HsSomeApples"; // we need to add $string_3 = "HasApplesAlready"; // already exists at the beginning echo "string_1: ". (strpos($string_1,"Has") !== 0 ? "Has".$string_1: $string_1)."\n"; echo "string_2: ". (strpos($string_2,"Has") !== 0 ? "Has".$string_2: $string_2)."\n"; echo "string_3: ". (strpos($string_3,"Has") !== 0 ? "Has".$string_3: $string_3)."\n";
Output for git.master, git.master_jit, rfc.property-hooks
string_1: HasAnaHasSomeApples string_2: HasHsSomeApples string_3: HasApplesAlready

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