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) && !is_null($a['asd']); } 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 = 35
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 35
Branch analysis from position: 28
2 jumps found. (Code = 46) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 34
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 13
filename:       /in/YnYrg
function name:  (null)
number of ops:  41
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, ->35
         27    > > FE_FETCH_R                                               $14, !2, ->35
   13    28    >   ARRAY_KEY_EXISTS                                 ~15     'asd', !0
         29      > JMPZ_EX                                          ~15     ~15, ->34
         30    >   FETCH_DIM_R                                      ~16     !0, 'asd'
         31        TYPE_CHECK                                    2  ~17     ~16
         32        BOOL_NOT                                         ~18     ~17
         33        BOOL                                             ~15     ~18
   12    34    > > JMP                                                      ->27
         35    >   FE_FREE                                                  $14
   15    36        INIT_FCALL                                               'microtime'
         37        DO_ICALL                                         $19     
         38        SUB                                              ~20     $19, !1
         39        ECHO                                                     ~20
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.69 ms | 1400 KiB | 17 Q