3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public $x; } function main() { $c = new C(); $c->x = new C(); $c->x->x = new C(); $c->x->x->x = 5; $result = $c->x->x->x; unset($c->x->x->x); return $result; } var_dump(main());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmkMe
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'main'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function main:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KmkMe
function name:  main
number of ops:  25
compiled vars:  !0 = $c, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    9     3        NEW                                              $6      'C'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'x'
          6        OP_DATA                                                  $6
   10     7        NEW                                              $10     'C'
          8        DO_FCALL                                      0          
          9        FETCH_OBJ_W                                      $8      !0, 'x'
         10        ASSIGN_OBJ                                               $8, 'x'
         11        OP_DATA                                                  $10
   11    12        FETCH_OBJ_W                                      $12     !0, 'x'
         13        FETCH_OBJ_W                                      $13     $12, 'x'
         14        ASSIGN_OBJ                                               $13, 'x'
         15        OP_DATA                                                  5
   13    16        FETCH_OBJ_R                                      ~15     !0, 'x'
         17        FETCH_OBJ_R                                      ~16     ~15, 'x'
         18        FETCH_OBJ_R                                      ~17     ~16, 'x'
         19        ASSIGN                                                   !1, ~17
   14    20        FETCH_OBJ_UNSET                                  $19     !0, 'x'
         21        FETCH_OBJ_UNSET                                  $20     $19, 'x'
         22        UNSET_OBJ                                                $20, 'x'
   15    23      > RETURN                                                   !1
   16    24*     > RETURN                                                   null

End of function main

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.05 ms | 1390 KiB | 16 Q