3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = 10; $c = range(0,$range-1); while(list($i,$v)=each($c)) { } /* $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 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/OkEvK
function name:  (null)
number of ops:  17
compiled vars:  !0 = $range, !1 = $c, !2 = $i, !3 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
    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      > JMP                                                      ->8
          8    >   INIT_FCALL_BY_NAME                                       'each'
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $8      
         11        FETCH_LIST_R                                     $9      $8, 0
         12        ASSIGN                                                   !2, $9
         13        FETCH_LIST_R                                     $11     $8, 1
         14        ASSIGN                                                   !3, $11
         15      > JMPNZ                                                    $8, ->8
   19    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.78 ms | 1394 KiB | 18 Q