3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strings=[ 'e123f654g933c', 'e123f654g933ce99f77g66c' ]; foreach ($strings as $string) { var_export( array_map( function($v) { return preg_match_all('/[e-g]\d+/', $v, $out2) ? $out2[0] : []; }, preg_match_all('/(?:[e-g]\d+)+(?=c)/', $string, $out1) ? $out1[0] : [] ) ); echo"\n\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
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 16
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/G1lT5
function name:  (null)
number of ops:  25
compiled vars:  !0 = $strings, !1 = $string, !2 = $out1
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    8     1      > FE_RESET_R                                           $4      !0, ->23
          2    > > FE_FETCH_R                                                   $4, !1, ->23
    9     3    >   INIT_FCALL                                                   'var_export'
   10     4        INIT_FCALL                                                   'array_map'
   11     5        DECLARE_LAMBDA_FUNCTION                              ~5      [0]
   13     6        SEND_VAL                                                     ~5
   14     7        INIT_FCALL                                                   'preg_match_all'
          8        SEND_VAL                                                     '%2F%28%3F%3A%5Be-g%5D%5Cd%2B%29%2B%28%3F%3Dc%29%2F'
          9        SEND_VAR                                                     !1
         10        SEND_REF                                                     !2
         11        DO_ICALL                                             $6      
         12      > JMPZ                                                         $6, ->16
         13    >   FETCH_DIM_R                                          ~7      !2, 0
         14        QM_ASSIGN                                            ~8      ~7
         15      > JMP                                                          ->17
         16    >   QM_ASSIGN                                            ~8      <array>
         17    >   SEND_VAL                                                     ~8
   10    18        DO_ICALL                                             $9      
   14    19        SEND_VAR                                                     $9
    9    20        DO_ICALL                                                     
   17    21        ECHO                                                         '%0A%0A'
    8    22      > JMP                                                          ->2
         23    >   FE_FREE                                                      $4
   18    24      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G1lT5
function name:  {closure:/in/G1lT5:11}
number of ops:  13
compiled vars:  !0 = $v, !1 = $out2
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
   12     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%2F%5Be-g%5D%5Cd%2B%2F'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                             $2      
          6      > JMPZ                                                         $2, ->10
          7    >   FETCH_DIM_R                                          ~3      !1, 0
          8        QM_ASSIGN                                            ~4      ~3
          9      > JMP                                                          ->11
         10    >   QM_ASSIGN                                            ~4      <array>
         11    > > RETURN                                                       ~4
   13    12*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.36 ms | 2067 KiB | 16 Q