3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v1 = 0; $v2 = 0; for ($i = 1; $i <= 100; $i++) { $v1+= (int)((0.1+$i/10)*10); } for ($i = 1; $i <= 100; $i++) { $v2 += (int)(1 + $i); } print $v1 . PHP_EOL . $v2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 4
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 = 20, Position 2 = 14
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 14
Branch analysis from position: 20
Branch analysis from position: 14
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 4
Branch analysis from position: 12
Branch analysis from position: 4
filename:       /in/14mia
function name:  (null)
number of ops:  24
compiled vars:  !0 = $v1, !1 = $v2, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, 0
    6     2        ASSIGN                                                   !2, 1
          3      > JMP                                                      ->10
    7     4    >   DIV                                              ~6      !2, 10
          5        ADD                                              ~7      0.1, ~6
          6        MUL                                              ~8      ~7, 10
          7        CAST                                          4  ~9      ~8
          8        ASSIGN_OP                                     1          !0, ~9
    6     9        PRE_INC                                                  !2
         10    >   IS_SMALLER_OR_EQUAL                                      !2, 100
         11      > JMPNZ                                                    ~12, ->4
   10    12    >   ASSIGN                                                   !2, 1
         13      > JMP                                                      ->18
   11    14    >   ADD                                              ~14     1, !2
         15        CAST                                          4  ~15     ~14
         16        ASSIGN_OP                                     1          !1, ~15
   10    17        PRE_INC                                                  !2
         18    >   IS_SMALLER_OR_EQUAL                                      !2, 100
         19      > JMPNZ                                                    ~18, ->14
   14    20    >   CONCAT                                           ~19     !0, '%0A'
         21        CONCAT                                           ~20     ~19, !1
         22        ECHO                                                     ~20
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.97 ms | 1394 KiB | 13 Q