3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'aaa.bbb.ccc.ddd.eee.fff.ggg.hhh'; $max = 10; $retry = 1; do { echo $test . "\n"; preg_match("/^.+?\.(.+)$/", $test, $result); if (false === $result) throw new \InvalidArgumentException('invalid'); $test = $result[1]; } while ($retry++ < $max);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 3
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
filename:       /in/XiOiI
function name:  (null)
number of ops:  22
compiled vars:  !0 = $test, !1 = $max, !2 = $retry, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'aaa.bbb.ccc.ddd.eee.fff.ggg.hhh'
    4     1        ASSIGN                                                   !1, 10
    5     2        ASSIGN                                                   !2, 1
    7     3    >   CONCAT                                           ~7      !0, '%0A'
          4        ECHO                                                     ~7
    8     5        INIT_FCALL                                               'preg_match'
          6        SEND_VAL                                                 '%2F%5E.%2B%3F%5C.%28.%2B%29%24%2F'
          7        SEND_VAR                                                 !0
          8        SEND_REF                                                 !3
          9        DO_ICALL                                                 
    9    10        TYPE_CHECK                                    4          !3
         11      > JMPZ                                                     ~9, ->16
         12    >   NEW                                              $10     'InvalidArgumentException'
         13        SEND_VAL_EX                                              'invalid'
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $10
   10    16    >   FETCH_DIM_R                                      ~12     !3, 1
         17        ASSIGN                                                   !0, ~12
   11    18        POST_INC                                         ~14     !2
         19        IS_SMALLER                                               ~14, !1
         20      > JMPNZ                                                    ~15, ->3
         21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.71 ms | 1395 KiB | 15 Q