3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(); $a = range(1,100000); foreach ($a as $i) { isset($a['asd']); } echo microtime() - $time; $time = microtime(); $a = range(1,100000); foreach ($a as $i) { array_key_exists('asd', $a); } echo microtime() - $time;
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 = 27, Position 2 = 31
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 31
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
Branch analysis from position: 13
filename:       /in/4AY4L
function name:  (null)
number of ops:  37
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                                                 100000
          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
   10    18        INIT_FCALL                                               'microtime'
         19        DO_ICALL                                         $11     
         20        ASSIGN                                                   !0, $11
   11    21        INIT_FCALL                                               'range'
         22        SEND_VAL                                                 1
         23        SEND_VAL                                                 100000
         24        DO_ICALL                                         $13     
         25        ASSIGN                                                   !1, $13
   12    26      > FE_RESET_R                                       $15     !1, ->31
         27    > > FE_FETCH_R                                               $15, !2, ->31
   13    28    >   ARRAY_KEY_EXISTS                                 ~16     'asd', !1
         29        FREE                                                     ~16
   12    30      > JMP                                                      ->27
         31    >   FE_FREE                                                  $15
   15    32        INIT_FCALL                                               'microtime'
         33        DO_ICALL                                         $17     
         34        SUB                                              ~18     $17, !0
         35        ECHO                                                     ~18
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.08 ms | 1400 KiB | 17 Q