3v4l.org

run code in 300+ 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.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
'45' 45 '9458' 9458 '8458' 8458

preferences:
103.8 ms | 402 KiB | 91 Q