3v4l.org

run code in 500+ PHP versions simultaneously
<?php for ($i = 0; $i < 100000; $i++) { $GLOBALS["a$i"] = rand(0, 1000000); } $copiedGlobals = $GLOBALS; $start = microtime(true); for ($runs = 1000; $runs > 0; $runs--) { array_key_exists('a1111111', $copiedGlobals); } $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 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 21
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 21
Branch analysis from position: 26
Branch analysis from position: 21
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/lkk0G
function name:  (null)
number of ops:  36
compiled vars:  !0 = $i, !1 = $copiedGlobals, !2 = $start, !3 = $runs, !4 = $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                                          ~6      'a', !0
          4        INIT_FCALL                                                   'rand'
          5        SEND_VAL                                                     0
          6        SEND_VAL                                                     1000000
          7        DO_ICALL                                             $8      
          8        FETCH_W                          global              $7      ~6
          9        ASSIGN                                                       $7, $8
    3    10        PRE_INC                                                      !0
         11    >   IS_SMALLER                                                   !0, 100000
         12      > JMPNZ                                                        ~11, ->2
    6    13    >   FETCH_GLOBALS                                        ~12     
         14        ASSIGN                                                       !1, ~12
    7    15        INIT_FCALL                                                   'microtime'
         16        SEND_VAL                                                     <true>
         17        DO_ICALL                                             $14     
         18        ASSIGN                                                       !2, $14
    8    19        ASSIGN                                                       !3, 1000
         20      > JMP                                                          ->24
    9    21    >   ARRAY_KEY_EXISTS                                     ~17     'a1111111', !1
         22        FREE                                                         ~17
    8    23        PRE_DEC                                                      !3
         24    >   IS_SMALLER                                                   0, !3
         25      > JMPNZ                                                        ~19, ->21
   11    26    >   INIT_FCALL                                                   'microtime'
         27        SEND_VAL                                                     <true>
         28        DO_ICALL                                             $20     
         29        ASSIGN                                                       !4, $20
   12    30        INIT_FCALL                                                   'printf'
         31        SEND_VAL                                                     '%5BGLOBALS%5Darray_key_exists%28%29+took+%25.5f+seconds%0A'
         32        SUB                                                  ~22     !4, !2
         33        SEND_VAL                                                     ~22
         34        DO_ICALL                                                     
         35      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.24 ms | 1108 KiB | 16 Q