3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $b; public function __destruct() { echo "destruct\n"; } } class B { public $a; } function test() { $a = new A(); $b = new B(); $a->b = $b; $b->a = $a; } test(); echo "before destruct\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bDFHR
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0          
   27     2        ECHO                                                     'before+destruct%0A'
          3      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bDFHR
function name:  test
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   21     3        NEW                                              $5      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   22     6        ASSIGN_OBJ                                               !0, 'b'
          7        OP_DATA                                                  !1
   23     8        ASSIGN_OBJ                                               !1, 'a'
          9        OP_DATA                                                  !0
   24    10      > RETURN                                                   null

End of function test

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

End of function __destruct

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.55 ms | 1398 KiB | 14 Q