3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 0; for($i=0;$i<100;$i+=2) { $n+=$i; } echo $n; $i = 0; $num = 0; while($i <= 50) { $num += $i * 2; $i ++; } echo $num;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 11
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 11
Branch analysis from position: 16
Branch analysis from position: 11
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
Branch analysis from position: 3
filename:       /in/kGUbf
function name:  (null)
number of ops:  18
compiled vars:  !0 = $n, !1 = $i, !2 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->5
    4     3    >   ASSIGN_OP                                     1          !0, !1
    3     4        ASSIGN_OP                                     1          !1, 2
          5    >   IS_SMALLER                                               !1, 100
          6      > JMPNZ                                                    ~7, ->3
    6     7    >   ECHO                                                     !0
    8     8        ASSIGN                                                   !1, 0
    9     9        ASSIGN                                                   !2, 0
   10    10      > JMP                                                      ->14
   11    11    >   MUL                                              ~10     !1, 2
         12        ASSIGN_OP                                     1          !2, ~10
   12    13        PRE_INC                                                  !1
   10    14    >   IS_SMALLER_OR_EQUAL                                      !1, 50
         15      > JMPNZ                                                    ~13, ->11
   14    16    >   ECHO                                                     !2
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.73 ms | 1394 KiB | 13 Q