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 = new stdClass; $a = [ 'a' => [ 'a' => [ 'a' => 'a' ] ] ]; $b = $a->a->a; var_dump($b); var_dump($b = 'c'); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DW1Bj
function name:  (null)
number of ops:  33
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        NEW                                              $15     'stdClass'
         13        DO_FCALL                                      0          
         14        FETCH_OBJ_W                                      $12     !0, 'a'
         15        FETCH_OBJ_W                                      $13     $12, 'a'
         16        ASSIGN_OBJ                                               $13, 'a'
         17        OP_DATA                                                  $15
   10    18        ASSIGN                                                   !0, <array>
   12    19        FETCH_OBJ_R                                      ~18     !0, 'a'
         20        FETCH_OBJ_R                                      ~19     ~18, 'a'
         21        ASSIGN                                                   !1, ~19
   14    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
   16    25        INIT_FCALL                                               'var_dump'
         26        ASSIGN                                           ~22     !1, 'c'
         27        SEND_VAL                                                 ~22
         28        DO_ICALL                                                 
   18    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.35 ms | 1388 KiB | 15 Q