3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (preg_match('/^(?P<base>[^[]+)(?P<extra>(\[.*)|$)/', 'foo[bar][baz]', $m)) { $segments = array($m['base']); while (preg_match('/^\[(?P<segment>.*?)\](?P<extra>.*)$/', $m['extra'], $m)) { echo $m['segment']."\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 10
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 10
Branch analysis from position: 20
Branch analysis from position: 10
Branch analysis from position: 20
filename:       /in/P8YjH
function name:  (null)
number of ops:  21
compiled vars:  !0 = $m, !1 = $segments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2F%5E%28%3FP%3Cbase%3E%5B%5E%5B%5D%2B%29%28%3FP%3Cextra%3E%28%5C%5B.%2A%29%7C%24%29%2F'
          2        SEND_VAL                                                 'foo%5Bbar%5D%5Bbaz%5D'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->20
    3     6    >   FETCH_DIM_R                                      ~3      !0, 'base'
          7        INIT_ARRAY                                       ~4      ~3
          8        ASSIGN                                                   !1, ~4
    4     9      > JMP                                                      ->13
    5    10    >   FETCH_DIM_R                                      ~6      !0, 'segment'
         11        CONCAT                                           ~7      ~6, '%0A'
         12        ECHO                                                     ~7
    4    13    >   INIT_FCALL                                               'preg_match'
         14        SEND_VAL                                                 '%2F%5E%5C%5B%28%3FP%3Csegment%3E.%2A%3F%29%5C%5D%28%3FP%3Cextra%3E.%2A%29%24%2F'
         15        FETCH_DIM_R                                      ~8      !0, 'extra'
         16        SEND_VAL                                                 ~8
         17        SEND_REF                                                 !0
         18        DO_ICALL                                         $9      
         19      > JMPNZ                                                    $9, ->10
    9    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.84 ms | 1395 KiB | 15 Q