3v4l.org

run code in 500+ 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/JUiPM
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/JUiPM
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/JUiPM
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   ECHO                                                         'Foo%3A%3A__destruct'
          1        ECHO                                                         '%0A'
    9     2        UNSET_OBJ                                                    'bar'
   10     3      > 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/JUiPM
function name:  __destruct
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                         'Bar%3A%3A__destruct'
          1        ECHO                                                         '%0A'
   16     2        UNSET_OBJ                                                    'bar'
   17     3      > RETURN                                                       null

End of function __destruct

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.09 ms | 3035 KiB | 13 Q