3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( '0', '00', '000', '0000', '00000', '000000', '0000000', '00000000'); $id_pattern = "/^\d{7}$/"; foreach($arr as $id){ if(preg_match($id_pattern, $id, $regs)) var_dump($regs); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/nicka
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr, !1 = $id_pattern, !2 = $id, !3 = $regs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, '%2F%5E%5Cd%7B7%7D%24%2F'
   12     2      > FE_RESET_R                                       $6      !0, ->14
          3    > > FE_FETCH_R                                               $6, !2, ->14
   13     4    >   INIT_FCALL                                               'preg_match'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        SEND_REF                                                 !3
          8        DO_ICALL                                         $7      
          9      > JMPZ                                                     $7, ->13
         10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                                 
   12    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $6
   14    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.89 ms | 1395 KiB | 17 Q