3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0; $i < 100000; $i++) { $GLOBALS["a$i"] = rand(0, 1000000); } $start = microtime(true); for ($runs = 1000; $runs > 0; $runs--) { array_key_exists('a1111111', $GLOBALS); } $end = microtime(true); printf("[GLOBALS]array_key_exists() took %.5f seconds\n", $end - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 19
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 19
Branch analysis from position: 25
Branch analysis from position: 19
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
Branch analysis from position: 2
filename:       /in/91CFl
function name:  (null)
number of ops:  35
compiled vars:  !0 = $i, !1 = $start, !2 = $runs, !3 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->11
    4     2    >   NOP                                                      
          3        FAST_CONCAT                                      ~5      'a', !0
          4        INIT_FCALL                                               'rand'
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1000000
          7        DO_ICALL                                         $7      
          8        FETCH_W                      global              $6      ~5
          9        ASSIGN                                                   $6, $7
    3    10        PRE_INC                                                  !0
         11    >   IS_SMALLER                                               !0, 100000
         12      > JMPNZ                                                    ~10, ->2
    7    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $11     
         16        ASSIGN                                                   !1, $11
    8    17        ASSIGN                                                   !2, 1000
         18      > JMP                                                      ->23
    9    19    >   FETCH_GLOBALS                                    ~14     
         20        ARRAY_KEY_EXISTS                                 ~15     'a1111111', ~14
         21        FREE                                                     ~15
    8    22        PRE_DEC                                                  !2
         23    >   IS_SMALLER                                               0, !2
         24      > JMPNZ                                                    ~17, ->19
   11    25    >   INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $18     
         28        ASSIGN                                                   !3, $18
   12    29        INIT_FCALL                                               'printf'
         30        SEND_VAL                                                 '%5BGLOBALS%5Darray_key_exists%28%29+took+%25.5f+seconds%0A'
         31        SUB                                              ~20     !3, !1
         32        SEND_VAL                                                 ~20
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.22 ms | 1013 KiB | 16 Q