3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Peter (1) (143) Peter (2) (144) Daniel (12) "; preg_match("/([\d()]+)$/", $str, $match); print_r($match);

preferences:
49.11 ms | 402 KiB | 5 Q