3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; for($i = 0; 9999 > $i; $i++){ $array[] = $i; } $startTimeForLoop = time(); foreach($array as $key => $value){ $foo = 'bar'; } echo time()-$startTimeForLoop; echo '<br>'; $startTimeForEnd = time(); var_dump(end($array)); echo time()-$startTimeForEnd;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/7LeKu
function name:  (null)
number of ops:  36
compiled vars:  !0 = $array, !1 = $i, !2 = $startTimeForLoop, !3 = $value, !4 = $key, !5 = $foo, !6 = $startTimeForEnd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    5     3    >   ASSIGN_DIM                                               !0
          4        OP_DATA                                                  !1
    4     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 9999
          7      > JMPNZ                                                    ~11, ->3
    8     8    >   INIT_FCALL                                               'time'
          9        DO_ICALL                                         $12     
         10        ASSIGN                                                   !2, $12
    9    11      > FE_RESET_R                                       $14     !0, ->16
         12    > > FE_FETCH_R                                       ~15     $14, !3, ->16
         13    >   ASSIGN                                                   !4, ~15
   10    14        ASSIGN                                                   !5, 'bar'
    9    15      > JMP                                                      ->12
         16    >   FE_FREE                                                  $14
   12    17        INIT_FCALL                                               'time'
         18        DO_ICALL                                         $18     
         19        SUB                                              ~19     $18, !2
         20        ECHO                                                     ~19
   13    21        ECHO                                                     '%3Cbr%3E'
   15    22        INIT_FCALL                                               'time'
         23        DO_ICALL                                         $20     
         24        ASSIGN                                                   !6, $20
   16    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'end'
         27        SEND_REF                                                 !0
         28        DO_ICALL                                         $22     
         29        SEND_VAR                                                 $22
         30        DO_ICALL                                                 
   17    31        INIT_FCALL                                               'time'
         32        DO_ICALL                                         $24     
         33        SUB                                              ~25     $24, !6
         34        ECHO                                                     ~25
   18    35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.22 ms | 1396 KiB | 19 Q