3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myobject = (object)array("test"=>"worked"); echo $myobject->test; settype($myobject,'array'); echo $myobject['test'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CPfoI
function name:  (null)
number of ops:  11
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
    5     4        INIT_FCALL                                               'settype'
          5        SEND_REF                                                 !0
          6        SEND_VAL                                                 'array'
          7        DO_ICALL                                                 
    6     8        FETCH_DIM_R                                      ~5      !0, 'test'
          9        ECHO                                                     ~5
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.58 ms | 1385 KiB | 15 Q