3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['asd' => false]; $time = microtime(); foreach (range(1,100000) as $i) { isset($a['asd']); } echo microtime() - $time; echo "\n"; $time = microtime(); foreach (range(1,100000) 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/JnE97
function name:  (null)
number of ops:  37
compiled vars:  !0 = $a, !1 = $time, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'microtime'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !1, $4
    6     4        INIT_FCALL                                               'range'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 100000
          7        DO_ICALL                                         $6      
          8      > FE_RESET_R                                       $7      $6, ->13
          9    > > FE_FETCH_R                                               $7, !2, ->13
    7    10    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~8      !0, 'asd'
         11        FREE                                                     ~8
    6    12      > JMP                                                      ->9
         13    >   FE_FREE                                                  $7
    9    14        INIT_FCALL                                               'microtime'
         15        DO_ICALL                                         $9      
         16        SUB                                              ~10     $9, !1
         17        ECHO                                                     ~10
   10    18        ECHO                                                     '%0A'
   11    19        INIT_FCALL                                               'microtime'
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !1, $11
   12    22        INIT_FCALL                                               'range'
         23        SEND_VAL                                                 1
         24        SEND_VAL                                                 100000
         25        DO_ICALL                                         $13     
         26      > FE_RESET_R                                       $14     $13, ->31
         27    > > FE_FETCH_R                                               $14, !2, ->31
   13    28    >   ARRAY_KEY_EXISTS                                 ~15     'asd', !0
         29        FREE                                                     ~15
   12    30      > JMP                                                      ->27
         31    >   FE_FREE                                                  $14
   15    32        INIT_FCALL                                               'microtime'
         33        DO_ICALL                                         $16     
         34        SUB                                              ~17     $16, !1
         35        ECHO                                                     ~17
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.04 ms | 1400 KiB | 17 Q