3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = (object)['foo' => 'bar']; var_dump($t->foo); $t = (object)['foo']; $a=(array) $t; $t->{'1'} = 'bar'; var_dump($t->{0}, $t->{1}, $a[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y4oWT
function name:  (null)
number of ops:  21
compiled vars:  !0 = $t, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~2      <array>
          1        ASSIGN                                                   !0, ~2
    5     2        INIT_FCALL                                               'var_dump'
          3        FETCH_OBJ_R                                      ~4      !0, 'foo'
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                                 
    6     6        CAST                                          8  ~6      <array>
          7        ASSIGN                                                   !0, ~6
    7     8        CAST                                          7  ~8      !0
          9        ASSIGN                                                   !1, ~8
    8    10        ASSIGN_OBJ                                               !0, '1'
         11        OP_DATA                                                  'bar'
    9    12        INIT_FCALL                                               'var_dump'
         13        FETCH_OBJ_R                                      ~11     !0, '0'
         14        SEND_VAL                                                 ~11
         15        FETCH_OBJ_R                                      ~12     !0, '1'
         16        SEND_VAL                                                 ~12
         17        FETCH_DIM_R                                      ~13     !1, 0
         18        SEND_VAL                                                 ~13
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.13 ms | 1395 KiB | 15 Q