3v4l.org

run code in 300+ 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:  10
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        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5E%5CD%2B%7C%5Cd%2B%5CK.%2A%2F'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
   15     8        DO_ICALL                                                 
   17     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.58 ms | 997 KiB | 15 Q