3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; function __construct($bar) { $this->bar = $bar; } function __destruct() { echo __METHOD__,"\n"; //unset($this->bar); } } class Bar { function __destruct() { echo __METHOD__,"\n"; //unset($this->bar); } } $y = new Bar(); $x = new Foo($y); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MEFdQ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $y, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $2      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   20     3        NEW                                              $5      'Foo'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   21     7      > RETURN                                                   1

Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MEFdQ
function name:  __construct
number of ops:  4
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_OBJ                                               'bar'
          2        OP_DATA                                                  !0
    6     3      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MEFdQ
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                     'Foo%3A%3A__destruct'
          1        ECHO                                                     '%0A'
   10     2      > RETURN                                                   null

End of function __destruct

End of class Foo.

Class Bar:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MEFdQ
function name:  __destruct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'Bar%3A%3A__destruct'
          1        ECHO                                                     '%0A'
   17     2      > RETURN                                                   null

End of function __destruct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.14 ms | 1386 KiB | 13 Q