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"]); if(preg_match_all("/((?:[A-D]1)|(?:[A-D][E]?)|(Tr|Tb))/u", $param["string"], $mCats)){ $arCats = sort($mCats[0]); return asort($arCats); } else return false; } print_r(makeCatList(array("string"=>"сАв1beс1edeTr")));
Output for git.master, git.master_jit
Fatal error: Uncaught TypeError: asort(): Argument #1 ($array) must be of type array, bool given in /in/vARuS:10 Stack trace: #0 /in/vARuS(10): asort(true) #1 /in/vARuS(13): makeCatList(Array) #2 {main} thrown in /in/vARuS on line 10
Process exited with code 255.
Output for rfc.property-hooks
Fatal error: Uncaught TypeError: asort(): Argument #1 ($array) must be of type array, true given in /in/vARuS:10 Stack trace: #0 /in/vARuS(10): asort(true) #1 /in/vARuS(13): makeCatList(Array) #2 {main} thrown in /in/vARuS on line 10
Process exited with code 255.

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