3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { $rr = '121245121245612121646212'; for ($i = 0; $i<2000; $i++) { $f = str_replace('12','', $rr); if($i%20 ===0 ) { echo $f; } } } f(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0iW31
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'f'
          1        DO_FCALL                                      0          
   16     2      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 3
Branch analysis from position: 16
Branch analysis from position: 3
Branch analysis from position: 13
filename:       /in/0iW31
function name:  f
number of ops:  17
compiled vars:  !0 = $rr, !1 = $i, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '121245121245612121646212'
    5     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->14
    7     3    >   INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 '12'
          5        SEND_VAL                                                 ''
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !2, $5
    8     9        MOD                                              ~7      !1, 20
         10        IS_IDENTICAL                                             ~7, 0
         11      > JMPZ                                                     ~8, ->13
   10    12    >   ECHO                                                     !2
    5    13    >   PRE_INC                                                  !1
         14    >   IS_SMALLER                                               !1, 2000
         15      > JMPNZ                                                    ~10, ->3
   13    16    > > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.72 ms | 1389 KiB | 16 Q