3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('foo' => 42, 'bar' => null); $obj = new ArrayObject($arr); foreach (array($arr, $obj) as $ao) { var_dump($ao); foreach (array('foo', 'bar', 'qux') as $key) { echo "- '$key'\n"; echo 'isset: '; var_dump(isset($ao[$key])); echo 'array_key_exists: '; var_dump(array_key_exists($key, (array)$ao)); unset($ao[$key]); } var_dump($ao); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 37
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 37
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 31
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 31
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 31
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/WVJnf
function name:  (null)
number of ops:  39
compiled vars:  !0 = $arr, !1 = $obj, !2 = $ao, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $5      'ArrayObject'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $5
    6     5        INIT_ARRAY                                       ~8      !0
          6        ADD_ARRAY_ELEMENT                                ~8      !1
          7      > FE_RESET_R                                       $9      ~8, ->37
          8    > > FE_FETCH_R                                               $9, !2, ->37
    7     9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
    8    12      > FE_RESET_R                                       $11     <array>, ->31
         13    > > FE_FETCH_R                                               $11, !3, ->31
    9    14    >   ROPE_INIT                                     3  ~13     '-+%27'
         15        ROPE_ADD                                      1  ~13     ~13, !3
         16        ROPE_END                                      2  ~12     ~13, '%27%0A'
         17        ECHO                                                     ~12
   10    18        ECHO                                                     'isset%3A++++++++++++'
         19        INIT_FCALL                                               'var_dump'
         20        ISSET_ISEMPTY_DIM_OBJ                         0  ~15     !2, !3
         21        SEND_VAL                                                 ~15
         22        DO_ICALL                                                 
   11    23        ECHO                                                     'array_key_exists%3A+'
         24        INIT_FCALL                                               'var_dump'
         25        CAST                                          7  ~17     !2
         26        ARRAY_KEY_EXISTS                                 ~18     !3, ~17
         27        SEND_VAL                                                 ~18
         28        DO_ICALL                                                 
   12    29        UNSET_DIM                                                !2, !3
    8    30      > JMP                                                      ->13
         31    >   FE_FREE                                                  $11
   14    32        INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !2
         34        DO_ICALL                                                 
   15    35        ECHO                                                     '%0A'
    6    36      > JMP                                                      ->8
         37    >   FE_FREE                                                  $9
   16    38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.78 ms | 1400 KiB | 15 Q