3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = range(1, 10000); $r = 0; for($i=0, $length = count($arr);$i < $length;$i++) { $r += $arr[$i]; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 10
Branch analysis from position: 15
Branch analysis from position: 10
filename:       /in/hJaZ4
function name:  (null)
number of ops:  16
compiled vars:  !0 = $arr, !1 = $r, !2 = $i, !3 = $length
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    4     5        ASSIGN                                                   !1, 0
    5     6        ASSIGN                                                   !2, 0
          7        COUNT                                            ~8      !0
          8        ASSIGN                                                   !3, ~8
          9      > JMP                                                      ->13
    6    10    >   FETCH_DIM_R                                      ~10     !0, !2
         11        ASSIGN_OP                                     1          !1, ~10
    5    12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, !3
         14      > JMPNZ                                                    ~13, ->10
    7    15    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.15 ms | 1395 KiB | 15 Q