3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new \ArrayObject(['foo' => null]); var_dump($object); echo "\nobject array access:\n"; var_dump(isset($object['foo'])); var_dump(array_key_exists('foo', $object)); var_dump(property_exists($object, 'foo')); if (isset($object['foo']) || array_key_exists('foo', $object)) { var_dump($object['foo']); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 25, Position 2 = 27
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 27
filename:       /in/kOVRn
function name:  (null)
number of ops:  33
compiled vars:  !0 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ArrayObject'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    5     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
    7     7        ECHO                                                     '%0Aobject+array+access%3A%0A'
    9     8        INIT_FCALL                                               'var_dump'
          9        ISSET_ISEMPTY_DIM_OBJ                         0  ~5      !0, 'foo'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   10    12        INIT_FCALL                                               'var_dump'
         13        ARRAY_KEY_EXISTS                                 ~7      'foo', !0
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                                 
   11    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'property_exists'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 'foo'
         20        DO_ICALL                                         $9      
         21        SEND_VAR                                                 $9
         22        DO_ICALL                                                 
   13    23        ISSET_ISEMPTY_DIM_OBJ                         0  ~11     !0, 'foo'
         24      > JMPNZ_EX                                         ~11     ~11, ->27
         25    >   ARRAY_KEY_EXISTS                                 ~12     'foo', !0
         26        BOOL                                             ~11     ~12
         27    > > JMPZ                                                     ~11, ->32
   14    28    >   INIT_FCALL                                               'var_dump'
         29        FETCH_DIM_R                                      ~13     !0, 'foo'
         30        SEND_VAL                                                 ~13
         31        DO_ICALL                                                 
   15    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.6 ms | 1396 KiB | 17 Q