3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = "matrixrate_matrixrate_2"; $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); if(isset($matches[2])) { echo "Yeah"; }
based on tFKD2
Output for 4.3.0 - 7.1.0
1Array ( [0] => matrixrate_matrixrate_2 [1] => matrixrate_matrixrate_ [2] => 2 ) Yeah