3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "matrixrate_matrixrate_4"; $clean = str_replace('matrixrate_matrixrate_','',$text); echo is_numeric($clean); $rate = 'matrixrate_matrixrate_2'; preg_match("/^(matrixrate_matrixrate_)([0-9]*)/", $rate, $matches); print_r($matches);

preferences:
36.99 ms | 402 KiB | 5 Q