3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i=0; $max = 60000; while($i < $max) { $i++; $data[md5($i)] = true; } $stime = microtime(true); $i=0; while($i < $max) { array_key_exists('notexistingkey', $data); } $time = microtime(true) - $stime; echo "Starting array_key_exists => $time\n"; $stime = microtime(true); $i=0; while($i < $max) { isset($data['notexistingkey']); } $time = microtime(true) - $stime; echo "Starting isset => $time\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 17
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 36
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 36
Branch analysis from position: 40
Branch analysis from position: 36
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 17
Branch analysis from position: 21
Branch analysis from position: 17
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 3
Branch analysis from position: 11
Branch analysis from position: 3
filename:       /in/UHgee
function name:  (null)
number of ops:  50
compiled vars:  !0 = $i, !1 = $max, !2 = $data, !3 = $stime, !4 = $time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
          1        ASSIGN                                                   !1, 60000
    3     2      > JMP                                                      ->9
    4     3    >   PRE_INC                                                  !0
    5     4        INIT_FCALL                                               'md5'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $8      
          7        ASSIGN_DIM                                               !2, $8
          8        OP_DATA                                                  <true>
    3     9    >   IS_SMALLER                                               !0, !1
         10      > JMPNZ                                                    ~10, ->3
    8    11    >   INIT_FCALL                                               'microtime'
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !3, $11
   10    15        ASSIGN                                                   !0, 0
   11    16      > JMP                                                      ->19
   12    17    >   ARRAY_KEY_EXISTS                                 ~14     'notexistingkey', !2
         18        FREE                                                     ~14
   11    19    >   IS_SMALLER                                               !0, !1
         20      > JMPNZ                                                    ~15, ->17
   14    21    >   INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $16     
         24        SUB                                              ~17     $16, !3
         25        ASSIGN                                                   !4, ~17
   15    26        ROPE_INIT                                     3  ~20     'Starting+array_key_exists+%3D%3E+'
         27        ROPE_ADD                                      1  ~20     ~20, !4
         28        ROPE_END                                      2  ~19     ~20, '%0A'
         29        ECHO                                                     ~19
   17    30        INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $22     
         33        ASSIGN                                                   !3, $22
   18    34        ASSIGN                                                   !0, 0
   19    35      > JMP                                                      ->38
   20    36    >   ISSET_ISEMPTY_DIM_OBJ                         0  ~25     !2, 'notexistingkey'
         37        FREE                                                     ~25
   19    38    >   IS_SMALLER                                               !0, !1
         39      > JMPNZ                                                    ~26, ->36
   23    40    >   INIT_FCALL                                               'microtime'
         41        SEND_VAL                                                 <true>
         42        DO_ICALL                                         $27     
         43        SUB                                              ~28     $27, !3
         44        ASSIGN                                                   !4, ~28
   24    45        ROPE_INIT                                     3  ~31     'Starting+isset+%3D%3E+'
         46        ROPE_ADD                                      1  ~31     ~31, !4
         47        ROPE_END                                      2  ~30     ~31, '%0A'
         48        ECHO                                                     ~30
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.96 ms | 1400 KiB | 17 Q