3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Bot draws - nino: (JH)'; preg_match("#^Bot draws - ([a-z0-9\-\._]+)\: ?(\((.*)\))?$#i",$str,$match); if ( is_array($match) && isset($match[0]) && count($match[0]) > 0 ) { foreach ( $match[0] as $key=>$val ) { $$match[1][$key] = create_function($match[2][$key],$match[3][$key]); } } echo $match;

preferences:
38.48 ms | 402 KiB | 5 Q