3v4l.org

run code in 500+ PHP versions simultaneously
<?php $txt = 'dog.cat' . str_repeat('.dog.cat', 815); for ($i = 0; $i < 5; ++$i) { $txt .= '.dog.cat'; echo count(explode('.', $txt)) . "\n"; echo strlen($txt) . "\n"; if (preg_match("/[a-z]+(?:\.[a-z]+)*/i", $txt, $match)) { echo "A match was found." . strlen($match[0]); } else { echo "A match was not found."; } echo "\n---\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 8
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 30
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 8
Branch analysis from position: 35
Branch analysis from position: 8
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 8
Branch analysis from position: 35
Branch analysis from position: 8
filename:       /in/igUnE
function name:  (null)
number of ops:  36
compiled vars:  !0 = $txt, !1 = $i, !2 = $match
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'str_repeat'
          1        SEND_VAL                                                     '.dog.cat'
          2        SEND_VAL                                                     815
          3        DO_ICALL                                             $3      
          4        CONCAT                                               ~4      'dog.cat', $3
          5        ASSIGN                                                       !0, ~4
    5     6        ASSIGN                                                       !1, 0
          7      > JMP                                                          ->33
    6     8    >   ASSIGN_OP                                         8          !0, '.dog.cat'
    7     9        INIT_FCALL                                                   'explode'
         10        SEND_VAL                                                     '.'
         11        SEND_VAR                                                     !0
         12        DO_ICALL                                             $8      
         13        COUNT                                                ~9      $8
         14        CONCAT                                               ~10     ~9, '%0A'
         15        ECHO                                                         ~10
    8    16        STRLEN                                               ~11     !0
         17        CONCAT                                               ~12     ~11, '%0A'
         18        ECHO                                                         ~12
    9    19        INIT_FCALL                                                   'preg_match'
         20        SEND_VAL                                                     '%2F%5Ba-z%5D%2B%28%3F%3A%5C.%5Ba-z%5D%2B%29%2A%2Fi'
         21        SEND_VAR                                                     !0
         22        SEND_REF                                                     !2
         23        DO_ICALL                                             $13     
         24      > JMPZ                                                         $13, ->30
   10    25    >   FETCH_DIM_R                                          ~14     !2, 0
         26        STRLEN                                               ~15     ~14
         27        CONCAT                                               ~16     'A+match+was+found.', ~15
         28        ECHO                                                         ~16
    9    29      > JMP                                                          ->31
   12    30    >   ECHO                                                         'A+match+was+not+found.'
   14    31    >   ECHO                                                         '%0A---%0A'
    5    32        PRE_INC                                                      !1
         33    >   IS_SMALLER                                                   !1, 5
         34      > JMPNZ                                                        ~18, ->8
   15    35    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
190.82 ms | 1502 KiB | 16 Q