3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = new stdClass(); $n->dog = array(); $n->dog['und'][0]['value'] = '12345'; $d = 'dog'; print_r($n->{$d}['und']);//['und'][0]['value']; //print_r($n->{$d}['und']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y6qps
function name:  (null)
number of ops:  17
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        INIT_FCALL                                               'print_r'
         12        FETCH_OBJ_R                                      ~11     !0, !1
         13        FETCH_DIM_R                                      ~12     ~11, 'und'
         14        SEND_VAL                                                 ~12
         15        DO_ICALL                                                 
    8    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.2 ms | 1394 KiB | 15 Q