3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x=new stdClass;$x->prop = "foo";$y = &$x; $x = null; var_dump($y); $x=new stdClass;$x->prop = "foo";$y = $x; $x = null; var_dump($y);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZO3G1
function name:  (null)
number of ops:  21
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
          3        ASSIGN_OBJ                                               !0, 'prop'
          4        OP_DATA                                                  'foo'
          5        ASSIGN_REF                                               !1, !0
          6        ASSIGN                                                   !0, null
          7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    4    10        NEW                                              $9      'stdClass'
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !0, $9
         13        ASSIGN_OBJ                                               !0, 'prop'
         14        OP_DATA                                                  'foo'
         15        ASSIGN                                                   !1, !0
         16        ASSIGN                                                   !0, null
         17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.72 ms | 1399 KiB | 15 Q