3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.68 ms | 1384 KiB | 13 Q