3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $z = 10; } $a1 = new A(); $z = &$a1->z; var_dump($z); $a2 = clone $a1; $a1 = 11; var_dump($z); $a2 = 12; var_dump($z);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i83nM
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a1, !1 = $z, !2 = $a2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $3      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    9     3        FETCH_OBJ_W                                      $6      !0, 'z'
          4        ASSIGN_REF                                               !1, $6
   10     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   12     8        CLONE                                            ~9      !0
          9        ASSIGN                                                   !2, ~9
   14    10        ASSIGN                                                   !0, 11
   16    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   18    14        ASSIGN                                                   !2, 12
   20    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.63 ms | 1399 KiB | 15 Q