3v4l.org

run code in 150+ 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 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
Warning: Invalid argument supplied for foreach() in /in/MOWfS on line 7 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