3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array("stati3on8", "2ndExit", "block9a", "floor5"); var_dump(minMaxNum($arr)); die(); function minMaxNum ($arr = array()) { $min = $max = null;$all_nums = array(); foreach ($arr as $value) { $value = preg_split('/(?<=\d)(?=[a-zA-Z])|(?<=[a-zA-Z])(?=\d)/i', $value); $value = array_filter($value, function ($n){ if(!is_numeric($n)) { unset($n); }else { return $n; } }); array_push($all_nums, $value); } return $all_nums; }
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [0]=> array(2) { [1]=> string(1) "3" [3]=> string(1) "8" } [1]=> array(1) { [0]=> string(1) "2" } [2]=> array(1) { [1]=> string(1) "9" } [3]=> array(1) { [1]=> string(1) "5" } }

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:
47.24 ms | 402 KiB | 8 Q