3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $code = '123'; $test_code = str_replace('*', '[0-9]{1}', $code); echo 'test_code = '.$test_code."\n"; $course_filters = array('200','123'); if (!empty($course_filters)) { foreach ($course_filters as $key => $code) { preg_match('/'.$test_code.'/', $code, $matches); if ($matches) { echo "found = ".$code; } } }
Output for 4.3.0 - 7.1.7
test_code = 123 found = 123