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"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 23
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/ikO3Q
function name:  (null)
number of ops:  25
compiled vars:  !0 = $tests, !1 = $test, !2 = $match, !3 = $integer
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1      > FE_RESET_R                                           $5      !0, ->23
          2    > > FE_FETCH_R                                                   $5, !1, ->23
   10     3    >   INIT_FCALL                                                   'preg_match'
          4        SEND_VAL                                                     '%2F_%5CK%5Cd%2B%2F'
          5        SEND_VAR                                                     !1
          6        SEND_REF                                                     !2
          7        DO_ICALL                                                     
   11     8        INIT_FCALL                                                   'var_export'
          9        FETCH_DIM_R                                          ~7      !2, 0
         10        SEND_VAL                                                     ~7
         11        DO_ICALL                                                     
   12    12        ECHO                                                         '%09'
   13    13        INIT_FCALL                                                   'sscanf'
         14        SEND_VAR                                                     !1
         15        SEND_VAL                                                     '%25%2A%5B%5E_%5D_%25d'
         16        SEND_REF                                                     !3
         17        DO_ICALL                                                     
   14    18        INIT_FCALL                                                   'var_export'
         19        SEND_VAR                                                     !3
         20        DO_ICALL                                                     
   15    21        ECHO                                                         '%0A'
    9    22      > JMP                                                          ->2
         23    >   FE_FREE                                                      $5
   16    24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.82 ms | 1716 KiB | 16 Q