3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'foo' => 'bar', 'key' => 'value' ); $start = time(true); $a = isset($arr['foo']); $b = isset($arr['bar']); var_dump(time(true) - $start); $start = time(true); $a = array_key_exists('foo', $arr); $b = array_key_exists('bar', $arr); var_dump(time(true) - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sjWln
function name:  (null)
number of ops:  32
compiled vars:  !0 = $arr, !1 = $start, !2 = $a, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'time'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    9     5        ISSET_ISEMPTY_DIM_OBJ                         0  ~7      !0, 'foo'
          6        ASSIGN                                                   !2, ~7
   10     7        ISSET_ISEMPTY_DIM_OBJ                         0  ~9      !0, 'bar'
          8        ASSIGN                                                   !3, ~9
   11     9        INIT_FCALL                                               'var_dump'
         10        INIT_FCALL                                               'time'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $11     
         13        SUB                                              ~12     $11, !1
         14        SEND_VAL                                                 ~12
         15        DO_ICALL                                                 
   13    16        INIT_FCALL                                               'time'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $14     
         19        ASSIGN                                                   !1, $14
   14    20        ARRAY_KEY_EXISTS                                 ~16     'foo', !0
         21        ASSIGN                                                   !2, ~16
   15    22        ARRAY_KEY_EXISTS                                 ~18     'bar', !0
         23        ASSIGN                                                   !3, ~18
   16    24        INIT_FCALL                                               'var_dump'
         25        INIT_FCALL                                               'time'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $20     
         28        SUB                                              ~21     $20, !1
         29        SEND_VAL                                                 ~21
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.01 ms | 1395 KiB | 17 Q