3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('4' => 'foo', '4x' => 'bar'); $obj = (object)$arr; print_r($obj); print $obj->{4}; print $obj->{'4'};
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rsfIv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        CAST                                          8  ~3      !0
          2        ASSIGN                                                   !1, ~3
    5     3        INIT_FCALL                                               'print_r'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                                 
    8     6        FETCH_OBJ_R                                      ~6      !1, '4'
          7        ECHO                                                     ~6
    9     8        FETCH_OBJ_R                                      ~7      !1, '4'
          9        ECHO                                                     ~7
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.24 ms | 1394 KiB | 15 Q