3v4l.org

run code in 500+ PHP versions simultaneously
<?php class SimpleClass { } $instance = new SimpleClass(); $assigned = $instance; $reference =& $instance; $instance->var = '$assigned will have this value'; $instance = null; // $instance and $reference become null var_dump($instance); var_dump($reference); var_dump($assigned);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lO3oJ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $instance, !1 = $assigned, !2 = $reference
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   NEW                                                  $3      'SimpleClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
   10     3        ASSIGN                                                       !1, !0
   11     4        ASSIGN_REF                                                   !2, !0
   13     5        ASSIGN_OBJ                                                   !0, 'var'
          6        OP_DATA                                                      '%24assigned+will+have+this+value'
   15     7        ASSIGN                                                       !0, null
   17     8        INIT_FCALL                                                   'var_dump'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
   18    11        INIT_FCALL                                                   'var_dump'
         12        SEND_VAR                                                     !2
         13        DO_ICALL                                                     
   19    14        INIT_FCALL                                                   'var_dump'
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Class SimpleClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.65 ms | 1614 KiB | 14 Q