3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = "4.3"; $string = "4.2 MM - 4.4MM (30PTS)"; preg_match_all("/([0-9.]+)\s*MM/", $string, $matches); // var_dump($matches[1][0], $matches[1][1]); if($value>=$matches[1][0] && $value<=$matches[1][1]) { echo "Yes in range."; }

preferences:
66.37 ms | 402 KiB | 5 Q