3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tests = [ '234534_45_92374', '3433_9458_034857', 'zx_8458_047346daf', ]; foreach ($tests as $test) { preg_match('/_\K\d+/', $test, $match); var_export($match[0]); echo "\t"; sscanf($test, '%*[^_]_%d', $integer); var_export($integer); echo "\n"; }
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
'45' 45 '9458' 9458 '8458' 8458

preferences:
94.65 ms | 1103 KiB | 4 Q