3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "RC9999999999A202"; Preg_match("/([A-Z]{2})(\d{10})A(\d+)/", $string, $match); List($string, $code, $phone, $amount) = $match; Echo $code . " ". $phone ." ". $amount;

preferences:
29.29 ms | 404 KiB | 5 Q