3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $FileContent = 'Bot draws - nino: (JH)'; preg_match("#^Bot draws - ([a-z0-9\-\._]+)\: ?(\((.*)\))?$#i",$FileContent,$Matches); if ( is_array($Matches) && isset($Matches[0]) && count($Matches[0]) > 0 ) { foreach ( $Matches[0] as $key=>$val ) { $$Matches[1][$key] = create_function($Matches[2][$key],$Matches[3][$key]); } } echo $Matches;
Output for 7.2.0 - 7.2.6
Warning: count(): Parameter must be an array or an object that implements Countable in /in/MOWfS on line 4 Warning: Invalid argument supplied for foreach() in /in/MOWfS on line 5 Notice: Array to string conversion in /in/MOWfS on line 9 Array
Output for 5.4.0 - 7.1.20
Warning: Invalid argument supplied for foreach() in /in/MOWfS on line 5 Notice: Array to string conversion in /in/MOWfS on line 9 Array
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.3.29
Warning: Invalid argument supplied for foreach() in /in/MOWfS on line 5 Array
Output for 4.3.11
Array