3v4l.org

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

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.43 ms | 1431 KiB | 14 Q