3v4l.org

run code in 300+ PHP versions simultaneously
<?php function boldify($pattern, $array){ $new_array = array(); foreach($array as $a) $new_array[] = $pattern."<b>".substr($a,strlen($pattern))."</b>"; return $new_array; } $starting_pattern = "Foo"; $array = array("Foo", "Foo RH 80", "Foo Foo RH 50 Foo", "Foo (RH 80 + 10) foo"); $new_array = boldify($starting_pattern, $array); var_dump($new_array);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [0]=> string(10) "Foo<b></b>" [1]=> string(16) "Foo<b> RH 80</b>" [2]=> string(24) "Foo<b> Foo RH 50 Foo</b>" [3]=> string(27) "Foo<b> (RH 80 + 10) foo</b>" }

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