3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(); $a = range(1,10000); foreach ($a as $i) { isset($a['asd']); } echo microtime() - $time, "\n"; $time = microtime(); $a = range(1,10000); foreach ($a as $i) { array_key_exists('asd', $a); } echo microtime() - $time, "\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 13
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 13
filename:       /in/IunFg
function name:  (null)
number of ops:  39
compiled vars:  !0 = $time, !1 = $a, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    4     3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 1
          5        SEND_VAL                                                 10000
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8      > FE_RESET_R                                       $7      !1, ->13
          9    > > FE_FETCH_R                                               $7, !2, ->13
    6    10    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~8      !1, 'asd'
         11        FREE                                                     ~8
    5    12      > JMP                                                      ->9
         13    >   FE_FREE                                                  $7
    8    14        INIT_FCALL                                               'microtime'
         15        DO_ICALL                                         $9      
         16        SUB                                              ~10     $9, !0
         17        ECHO                                                     ~10
         18        ECHO                                                     '%0A'
   10    19        INIT_FCALL                                               'microtime'
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !0, $11
   11    22        INIT_FCALL                                               'range'
         23        SEND_VAL                                                 1
         24        SEND_VAL                                                 10000
         25        DO_ICALL                                         $13     
         26        ASSIGN                                                   !1, $13
   12    27      > FE_RESET_R                                       $15     !1, ->32
         28    > > FE_FETCH_R                                               $15, !2, ->32
   13    29    >   ARRAY_KEY_EXISTS                                 ~16     'asd', !1
         30        FREE                                                     ~16
   12    31      > JMP                                                      ->28
         32    >   FE_FREE                                                  $15
   15    33        INIT_FCALL                                               'microtime'
         34        DO_ICALL                                         $17     
         35        SUB                                              ~18     $17, !0
         36        ECHO                                                     ~18
         37        ECHO                                                     '%0A'
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.63 ms | 1400 KiB | 17 Q