3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a=3; public $b=4; } $a = new A(); $b=$a; echo $a->a; $b->a=5; echo $a->a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D6ARP
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    7     3        ASSIGN                                                   !1, !0
    8     4        FETCH_OBJ_R                                      ~6      !0, 'a'
          5        ECHO                                                     ~6
    9     6        ASSIGN_OBJ                                               !1, 'a'
          7        OP_DATA                                                  5
   10     8        FETCH_OBJ_R                                      ~8      !0, 'a'
          9        ECHO                                                     ~8
         10      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.02 ms | 1392 KiB | 13 Q