3v4l.org

run code in 300+ PHP versions simultaneously
<?php define("EOL", "<br />\n"); $m = 3; for($i = 0; $i <= $m; $i++){ $k = $i ? floor(log($i, $m)) : 0; $l = 0; for($o = $k; $o >= 0; $o--){ $l += pow($m, $k); } echo $l, EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 7
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 22
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 7
Branch analysis from position: 36
Branch analysis from position: 7
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 22
Branch analysis from position: 30
Branch analysis from position: 22
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
filename:       /in/mXjJD
function name:  (null)
number of ops:  37
compiled vars:  !0 = $m, !1 = $i, !2 = $k, !3 = $l, !4 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'EOL'
          2        SEND_VAL                                                 '%3Cbr+%2F%3E%0A'
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, 3
    7     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->34
    8     7    > > JMPZ                                                     !1, ->17
          8    >   INIT_FCALL                                               'floor'
          9        INIT_FCALL                                               'log'
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $8      
         13        SEND_VAR                                                 $8
         14        DO_ICALL                                         $9      
         15        QM_ASSIGN                                        ~10     $9
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~10     0
         18    >   ASSIGN                                                   !2, ~10
    9    19        ASSIGN                                                   !3, 0
   11    20        ASSIGN                                                   !4, !2
         21      > JMP                                                      ->28
   12    22    >   INIT_FCALL                                               'pow'
         23        SEND_VAR                                                 !0
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $14     
         26        ASSIGN_OP                                     1          !3, $14
   11    27        PRE_DEC                                                  !4
         28    >   IS_SMALLER_OR_EQUAL                                      0, !4
         29      > JMPNZ                                                    ~17, ->22
   14    30    >   ECHO                                                     !3
         31        FETCH_CONSTANT                                   ~18     'EOL'
         32        ECHO                                                     ~18
    7    33        PRE_INC                                                  !1
         34    >   IS_SMALLER_OR_EQUAL                                      !1, !0
         35      > JMPNZ                                                    ~20, ->7
   15    36    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.81 ms | 1445 KiB | 17 Q