3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'A0000001002034'; $n = strlen($test); $incr = preg_replace_callback( '|(\d{1,2})/(\d{1,2})/(\d{4})|', function ($matches) { //return str_pad($matches[0] + 1, $n, 0, STR_PAD_LEFT); return strtolower($matches[0] + 1); }, $test ); echo $incr."\r\n";

preferences:
60.63 ms | 405 KiB | 6 Q