3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass; $a->a = new stdClass; $a->a->a = new stdClass; $a->a->a->a = 'a'; $a = [ 'a' => [ 'a' => [ 'a' => 'a' ] ] ]; $b = $a['a']['a']; var_dump($b); var_dump($b['a'] = 'c'); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E9AJn
function name:  (null)
number of ops:  32
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    5     3        NEW                                              $6      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'a'
          6        OP_DATA                                                  $6
    6     7        NEW                                              $10     'stdClass'
          8        DO_FCALL                                      0          
          9        FETCH_OBJ_W                                      $8      !0, 'a'
         10        ASSIGN_OBJ                                               $8, 'a'
         11        OP_DATA                                                  $10
    7    12        FETCH_OBJ_W                                      $12     !0, 'a'
         13        FETCH_OBJ_W                                      $13     $12, 'a'
         14        ASSIGN_OBJ                                               $13, 'a'
         15        OP_DATA                                                  'a'
   10    16        ASSIGN                                                   !0, <array>
   12    17        FETCH_DIM_R                                      ~16     !0, 'a'
         18        FETCH_DIM_R                                      ~17     ~16, 'a'
         19        ASSIGN                                                   !1, ~17
   14    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
   16    23        INIT_FCALL                                               'var_dump'
         24        ASSIGN_DIM                                       ~20     !1, 'a'
         25        OP_DATA                                                  'c'
         26        SEND_VAL                                                 ~20
         27        DO_ICALL                                                 
   18    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.25 ms | 1395 KiB | 15 Q