3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.76 ms | 1394 KiB | 15 Q