3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $prop = 'default value'; } $obj = new Test; $obj->{1} = null; $arr = (array) $obj; $arr['prop'] = 'new value'; echo $obj->prop;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S5tJV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    9     3        ASSIGN_OBJ                                               !0, '1'
          4        OP_DATA                                                  null
   11     5        CAST                                          7  ~6      !0
          6        ASSIGN                                                   !1, ~6
   12     7        ASSIGN_DIM                                               !1, 'prop'
          8        OP_DATA                                                  'new+value'
   14     9        FETCH_OBJ_R                                      ~9      !0, 'prop'
         10        ECHO                                                     ~9
   15    11      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
184.14 ms | 1397 KiB | 13 Q