3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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(); //} }
Output for 5.3.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Warning: explode() expects parameter 2 to be string, array given in /in/tM12Q on line 6 Warning: explode() expects parameter 2 to be string, array given in /in/tM12Q on line 6 Warning: explode() expects parameter 2 to be string, array given in /in/tM12Q on line 6
Output for 4.3.0 - 5.3.0
Notice: Array to string conversion in /in/tM12Q on line 6 Array Notice: Array to string conversion in /in/tM12Q on line 6 Array Notice: Array to string conversion in /in/tM12Q on line 6 Array