3v4l.org

run code in 500+ PHP versions simultaneously
<?php $pattern = []; for ($i = 0; $i < 300; $i++) { $pattern[] = "(?'group{$i}'{$i}$)"; } $fullPattern = '/' . implode('|', $pattern) . '/uix'; preg_match($fullPattern, '150', $matches); var_dump(isset($matches['group253'])); var_dump(isset($matches['group254'])); var_dump(isset($matches['group255'])); var_dump($matches['group150']); var_dump($matches['group151']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/5CR74
function name:  (null)
number of ops:  43
compiled vars:  !0 = $pattern, !1 = $i, !2 = $fullPattern, !3 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    3     1        ASSIGN                                                       !1, 0
          2      > JMP                                                          ->11
    4     3    >   ROPE_INIT                                         5  ~8      '%28%3F%27group'
          4        ROPE_ADD                                          1  ~8      ~8, !1
          5        ROPE_ADD                                          2  ~8      ~8, '%27'
          6        ROPE_ADD                                          3  ~8      ~8, !1
          7        ROPE_END                                          4  ~7      ~8, '%24%29'
          8        ASSIGN_DIM                                                   !0
          9        OP_DATA                                                      ~7
    3    10        PRE_INC                                                      !1
         11    >   IS_SMALLER                                                   !1, 300
         12      > JMPNZ                                                        ~12, ->3
    7    13    >   FRAMELESS_ICALL_2                implode             ~13     '%7C', !0
         14        CONCAT                                               ~14     '%2F', ~13
         15        CONCAT                                               ~15     ~14, '%2Fuix'
         16        ASSIGN                                                       !2, ~15
    9    17        INIT_FCALL                                                   'preg_match'
         18        SEND_VAR                                                     !2
         19        SEND_VAL                                                     '150'
         20        SEND_REF                                                     !3
         21        DO_ICALL                                                     
   10    22        INIT_FCALL                                                   'var_dump'
         23        ISSET_ISEMPTY_DIM_OBJ                             0  ~18     !3, 'group253'
         24        SEND_VAL                                                     ~18
         25        DO_ICALL                                                     
   11    26        INIT_FCALL                                                   'var_dump'
         27        ISSET_ISEMPTY_DIM_OBJ                             0  ~20     !3, 'group254'
         28        SEND_VAL                                                     ~20
         29        DO_ICALL                                                     
   12    30        INIT_FCALL                                                   'var_dump'
         31        ISSET_ISEMPTY_DIM_OBJ                             0  ~22     !3, 'group255'
         32        SEND_VAL                                                     ~22
         33        DO_ICALL                                                     
   14    34        INIT_FCALL                                                   'var_dump'
         35        FETCH_DIM_R                                          ~24     !3, 'group150'
         36        SEND_VAL                                                     ~24
         37        DO_ICALL                                                     
   15    38        INIT_FCALL                                                   'var_dump'
         39        FETCH_DIM_R                                          ~26     !3, 'group151'
         40        SEND_VAL                                                     ~26
         41        DO_ICALL                                                     
         42      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.69 ms | 2327 KiB | 15 Q