3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array=array('A-C','A-E','Yes or No'); $result=array_map("showresult",$array); function showresult($a){ $case=preg_match_all('/-|or/',$a,$matches); $a_explode=explode($a,$matches[0]); print_r($a_explode[0]); // switch($matches[0]){ //case "-":for(); //} }

preferences:
35.2 ms | 402 KiB | 5 Q