3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = 1; $obj = new stdClass; $obj->$key = 'val'; $arr = (array) $obj; var_dump($arr); var_dump($key); var_dump(isset($arr[$key]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4hq9d
function name:  (null)
number of ops:  19
compiled vars:  !0 = $key, !1 = $obj, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        NEW                                              $4      'stdClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    5     4        ASSIGN_OBJ                                               !1, !0
          5        OP_DATA                                                  'val'
    6     6        CAST                                          7  ~8      !1
          7        ASSIGN                                                   !2, ~8
    8     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
   10    14        INIT_FCALL                                               'var_dump'
         15        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !2, !0
         16        SEND_VAL                                                 ~12
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.26 ms | 1394 KiB | 15 Q