3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "testabc"; $regex = "(abc)A"; for ($i = 0; $i < strlen($string); $i++) { var_dump(preg_match($regex, $string, $match, 0, $i)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 4
Branch analysis from position: 18
Branch analysis from position: 4
filename:       /in/6vNHQ
function name:  (null)
number of ops:  19
compiled vars:  !0 = $string, !1 = $regex, !2 = $i, !3 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'testabc'
    5     1        ASSIGN                                                   !1, '%28abc%29A'
    7     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->15
    8     4    >   INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'preg_match'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !0
          8        SEND_REF                                                 !3
          9        SEND_VAL                                                 0
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
    7    14        PRE_INC                                                  !2
         15    >   STRLEN                                           ~10     !0
         16        IS_SMALLER                                               !2, ~10
         17      > JMPNZ                                                    ~11, ->4
    9    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.86 ms | 1395 KiB | 17 Q