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); // echo "$matches[0]";die(); $a_explode=explode("$matches[0]",$a); echo $a_explode[0]; // switch($matches[0]){ //case "-":for(); //} }
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/Tvr0P on line 7 A-C Notice: Array to string conversion in /in/Tvr0P on line 7 A-E Notice: Array to string conversion in /in/Tvr0P on line 7 Yes or No
Output for 4.3.0 - 5.3.29
A-CA-EYes or No