3v4l.org

run code in 300+ PHP versions simultaneously
<?php function makeCatList($param){ $arResult = array(); $s = array("@[aаА]@u","@[bвВбБ]@u","@[cсС]@u","@[dдД]@u","@[eеЕ]@u","@[tтТ]@u","@[rрР]@u","@TB@u"); $r = array("A","B","C","D","E","T","r","Tb"); $param["string"] = preg_replace($s, $r, $param["string"]); echo $param["string"]; if(preg_match_all("/((?:[A-D]1)|(?:[A-D][E]?)|(Tr|Tb))/u", $param["string"], $mCats)){ sort($mCats[0]); return $mCats[0]; } else return false; } $a = makeCatList(array("string"=>"dвсАв1beс1edeTr")); print_r($a);
Output for git.master, git.master_jit, rfc.property-hooks
DBCAB1BEC1EDETrArray ( [0] => A [1] => B [2] => B1 [3] => BE [4] => C [5] => C1 [6] => D [7] => DE [8] => Tr )

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