3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strings = [ 'stage', // expect empty string '8.-10. stage', // expect 8 '8. stage', // expect 8 '8.-10. stage 1st', // expect 8 'Test 8. stage 2020', // expect 8 'Test 8.-10. stage - 2020 test', // expect 8 'A1B2C3D4D5E6F7G8', // expect 1 '1000', // expect 1000 'Test 2020', // ecpect 2020 ]; var_export( preg_replace('/^\D+|\d+\K.*/', '', $strings) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hABgk
function name:  (null)
number of ops:  7
compiled vars:  !0 = $strings
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   15     1        INIT_FCALL                                                   'var_export'
   16     2        FRAMELESS_ICALL_3                preg_replace        ~2      '%2F%5E%5CD%2B%7C%5Cd%2B%5CK.%2A%2F', ''
          3        OP_DATA                                                      !0
          4        SEND_VAL                                                     ~2
   15     5        DO_ICALL                                                     
   17     6      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
226.03 ms | 2141 KiB | 14 Q