3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (preg_match_all("/\bgallery-\b/i", "PHP [gallery-1].", $matches, PREG_OFFSET_CAPTURE)) { print_r($matches); } else { echo "A match was not found."; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GkLhS
function name:  (null)
number of ops:  13
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_match_all'
          1        SEND_VAL                                                 '%2F%5Cbgallery-%5Cb%2Fi'
          2        SEND_VAL                                                 'PHP+%5Bgallery-1%5D.'
          3        SEND_REF                                                 !0
          4        SEND_VAL                                                 256
          5        DO_ICALL                                         $1      
          6      > JMPZ                                                     $1, ->11
    4     7    >   INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > JMP                                                      ->12
    6    11    >   ECHO                                                     'A+match+was+not+found.'
    7    12    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.35 ms | 1394 KiB | 17 Q