3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tags = "-10 ayanami_rei"; preg_match_all('/-\d+/', $tags, $matches); var_dump($matches[0]); if ($matches[0]){ $loop = substr($matches[0],1,strlen($matches[0])); $tags = str_replace("{$matches[0]} ","",$tags); $loop = ($loop >=11 ? 10 : $loop); } else { $loop = 1; } for ($i = 1; $i <= $loop; $i++) { echo $tags; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 37
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 40
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 40
Branch analysis from position: 44
Branch analysis from position: 40
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
filename:       /in/T5CSc
function name:  (null)
number of ops:  45
compiled vars:  !0 = $tags, !1 = $matches, !2 = $loop, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '-10+ayanami_rei'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F-%5Cd%2B%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        INIT_FCALL                                               'var_dump'
          7        FETCH_DIM_R                                      ~6      !1, 0
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
    6    10        FETCH_DIM_R                                      ~8      !1, 0
         11      > JMPZ                                                     ~8, ->37
    7    12    >   INIT_FCALL                                               'substr'
         13        FETCH_DIM_R                                      ~9      !1, 0
         14        SEND_VAL                                                 ~9
         15        SEND_VAL                                                 1
         16        FETCH_DIM_R                                      ~10     !1, 0
         17        STRLEN                                           ~11     ~10
         18        SEND_VAL                                                 ~11
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !2, $12
    8    21        INIT_FCALL                                               'str_replace'
         22        FETCH_DIM_R                                      ~14     !1, 0
         23        NOP                                                      
         24        FAST_CONCAT                                      ~15     ~14, '+'
         25        SEND_VAL                                                 ~15
         26        SEND_VAL                                                 ''
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $16     
         29        ASSIGN                                                   !0, $16
    9    30        IS_SMALLER_OR_EQUAL                                      11, !2
         31      > JMPZ                                                     ~18, ->34
         32    >   QM_ASSIGN                                        ~19     10
         33      > JMP                                                      ->35
         34    >   QM_ASSIGN                                        ~19     !2
         35    >   ASSIGN                                                   !2, ~19
         36      > JMP                                                      ->38
   11    37    >   ASSIGN                                                   !2, 1
   14    38    >   ASSIGN                                                   !3, 1
         39      > JMP                                                      ->42
   15    40    >   ECHO                                                     !0
   14    41        PRE_INC                                                  !3
         42    >   IS_SMALLER_OR_EQUAL                                      !3, !2
         43      > JMPNZ                                                    ~24, ->40
   16    44    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.75 ms | 945 KiB | 22 Q