3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = microtime(true); $arr = array(1, 2, 3); $x = &$arr[2]; for ($i = 0; $i < 100000; ++$i) $x; printf("%0.04f\n", microtime(true) - $t); $t = microtime(true); $arr = array(1, 2, 3); for ($i = 0; $i < 100000; ++$i) $arr[2]; printf("%0.04f\n", microtime(true) - $t);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 9
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 27
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 27
Branch analysis from position: 32
Branch analysis from position: 27
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 9
Branch analysis from position: 12
Branch analysis from position: 9
filename:       /in/ucUeU
function name:  (null)
number of ops:  41
compiled vars:  !0 = $t, !1 = $arr, !2 = $x, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        ASSIGN                                                   !1, <array>
    4     5        FETCH_DIM_W                                      $7      !1, 2
          6        ASSIGN_REF                                               !2, $7
    5     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->10
          9    >   PRE_INC                                                  !3
         10    >   IS_SMALLER                                               !3, 100000
         11      > JMPNZ                                                    ~11, ->9
    7    12    >   INIT_FCALL                                               'printf'
         13        SEND_VAL                                                 '%250.04f%0A'
         14        INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $12     
         17        SUB                                              ~13     $12, !0
         18        SEND_VAL                                                 ~13
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $15     
         23        ASSIGN                                                   !0, $15
   11    24        ASSIGN                                                   !1, <array>
   12    25        ASSIGN                                                   !3, 0
         26      > JMP                                                      ->30
   13    27    >   FETCH_DIM_R                                      ~19     !1, 2
         28        FREE                                                     ~19
   12    29        PRE_INC                                                  !3
         30    >   IS_SMALLER                                               !3, 100000
         31      > JMPNZ                                                    ~21, ->27
   14    32    >   INIT_FCALL                                               'printf'
         33        SEND_VAL                                                 '%250.04f%0A'
         34        INIT_FCALL                                               'microtime'
         35        SEND_VAL                                                 <true>
         36        DO_ICALL                                         $22     
         37        SUB                                              ~23     $22, !0
         38        SEND_VAL                                                 ~23
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.25 ms | 1400 KiB | 17 Q