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; 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/TEggU
function name:  (null)
number of ops:  30
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'
   12    16        FETCH_OBJ_R                                      ~15     !0, 'a'
         17        ASSIGN                                                   !1, ~15
   14    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   16    21        INIT_FCALL                                               'var_dump'
         22        ASSIGN_OBJ                                       ~18     !1, 'a'
         23        OP_DATA                                                  'c'
         24        SEND_VAL                                                 ~18
         25        DO_ICALL                                                 
   18    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.67 ms | 1399 KiB | 15 Q