3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = new stdClass(); $data->uid = 1234; print $data->uid; print $data->uid[0]; $data = array(); $data['uid'] = 1234; print $data['uid']; print $data['uid'][0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RHuis
function name:  (null)
number of ops:  19
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        ASSIGN_OBJ                                               !0, 'uid'
          4        OP_DATA                                                  1234
    5     5        FETCH_OBJ_R                                      ~5      !0, 'uid'
          6        ECHO                                                     ~5
    6     7        FETCH_OBJ_R                                      ~6      !0, 'uid'
          8        FETCH_DIM_R                                      ~7      ~6, 0
          9        ECHO                                                     ~7
    8    10        ASSIGN                                                   !0, <array>
    9    11        ASSIGN_DIM                                               !0, 'uid'
         12        OP_DATA                                                  1234
   10    13        FETCH_DIM_R                                      ~10     !0, 'uid'
         14        ECHO                                                     ~10
   11    15        FETCH_DIM_R                                      ~11     !0, 'uid'
         16        FETCH_DIM_R                                      ~12     ~11, 0
         17        ECHO                                                     ~12
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.49 ms | 1384 KiB | 13 Q