3v4l.org

run code in 300+ PHP versions simultaneously
<?php $init = 5; $str = round(5/3,2); $iter = 3; $total = $init; for($i = 0; $i < $iter; $i++){ if($i === 0){ $res = $init - ($str * ($iter-1)); }else{ $res = $str; } $total = $total - $res; } var_dump($total);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
Branch analysis from position: 10
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 10
Branch analysis from position: 23
Branch analysis from position: 10
filename:       /in/mkjFW
function name:  (null)
number of ops:  27
compiled vars:  !0 = $init, !1 = $str, !2 = $iter, !3 = $total, !4 = $i, !5 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 5
    3     1        INIT_FCALL                                               'round'
          2        SEND_VAL                                                 1.66667
          3        SEND_VAL                                                 2
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
    4     6        ASSIGN                                                   !2, 3
    5     7        ASSIGN                                                   !3, !0
    6     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->21
    7    10    >   IS_IDENTICAL                                             !4, 0
         11      > JMPZ                                                     ~12, ->17
    8    12    >   SUB                                              ~13     !2, 1
         13        MUL                                              ~14     !1, ~13
         14        SUB                                              ~15     !0, ~14
         15        ASSIGN                                                   !5, ~15
         16      > JMP                                                      ->18
   10    17    >   ASSIGN                                                   !5, !1
   12    18    >   SUB                                              ~18     !3, !5
         19        ASSIGN                                                   !3, ~18
    6    20        PRE_INC                                                  !4
         21    >   IS_SMALLER                                               !4, !2
         22      > JMPNZ                                                    ~21, ->10
   16    23    >   INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.57 ms | 1396 KiB | 17 Q