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_10'; preg_match("/^(matrixrate_matrixrate_)([0-9]*)/", $rate, $matches); print_r($matches); if(array_key_exists(2,$matches)) { echo "Yeah"; }
based on h0rkB
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1Array ( )