3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input_line = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"; $arr = preg_split("/( \()|(\) )/", $input_line); $arr2 =explode(" ", end($arr)); Unset($arr[count($arr)-1]); $arr = Array_merge($arr,$arr2); Var_dump($arr); $search = "Chr"; Foreach($arr as $val){ If($search == Substr($val,0,3)) echo $val; }
Output for git.master, git.master_jit, rfc.property-hooks
array(6) { [0]=> string(11) "Mozilla/5.0" [1]=> string(27) "Windows NT 10.0; Win64; x64" [2]=> string(18) "AppleWebKit/537.36" [3]=> string(17) "KHTML, like Gecko" [4]=> string(19) "Chrome/60.0.3112.90" [5]=> string(13) "Safari/537.36" } Chrome/60.0.3112.90

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:
173.27 ms | 406 KiB | 5 Q