3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myobject = (object)array("test"=>"worked"); echo $myobject->test; $myobject = (array)$myobject; echo $myobject['test'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/up0jf
function name:  (null)
number of ops:  9
compiled vars:  !0 = $myobject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN                                                   !0, ~1
    4     2        FETCH_OBJ_R                                      ~3      !0, 'test'
          3        ECHO                                                     ~3
    6     4        CAST                                          7  ~4      !0
          5        ASSIGN                                                   !0, ~4
    8     6        FETCH_DIM_R                                      ~6      !0, 'test'
          7        ECHO                                                     ~6
          8      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.39 ms | 1392 KiB | 13 Q