3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row = new stdClass; $field_name = 'field_my_field'; $delta = 0; $row->{$field_name}[$delta] = 'value'; // This works just fine. echo $row->$field_name[0]; $title_field = $field_name . ':title'; $row->{$field_name . ':title'} = array($delta => 'title');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lCIPg
function name:  (null)
number of ops:  18
compiled vars:  !0 = $row, !1 = $field_name, !2 = $delta, !3 = $title_field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        ASSIGN                                                   !1, 'field_my_field'
    4     4        ASSIGN                                                   !2, 0
    6     5        FETCH_OBJ_W                                      $9      !0, !1
          6        ASSIGN_DIM                                               $9, !2
          7        OP_DATA                                                  'value'
    7     8        FETCH_OBJ_R                                      ~11     !0, !1
          9        FETCH_DIM_R                                      ~12     ~11, 0
         10        ECHO                                                     ~12
    9    11        CONCAT                                           ~13     !1, '%3Atitle'
         12        ASSIGN                                                   !3, ~13
   10    13        CONCAT                                           ~15     !1, '%3Atitle'
         14        INIT_ARRAY                                       ~17     'title', !2
         15        ASSIGN_OBJ                                               !0, ~15
         16        OP_DATA                                                  ~17
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.54 ms | 1384 KiB | 13 Q