3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __destruct() { } } gc_disable(); $a1 = new A; $a2 = new A; $a1->ref = $a2; $a2->ref = $a1; $a1 = $a2 = NULL; echo('removed cycles: '.gc_collect_cycles());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m8p9l
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a1, !1 = $a2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'gc_disable'
          1        DO_ICALL                                                 
    9     2        NEW                                              $3      'A'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   10     5        NEW                                              $6      'A'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   12     8        ASSIGN_OBJ                                               !0, 'ref'
          9        OP_DATA                                                  !1
   13    10        ASSIGN_OBJ                                               !1, 'ref'
         11        OP_DATA                                                  !0
   15    12        ASSIGN                                           ~11     !1, null
         13        ASSIGN                                                   !0, ~11
   17    14        INIT_FCALL                                               'gc_collect_cycles'
         15        DO_ICALL                                         $13     
         16        CONCAT                                           ~14     'removed+cycles%3A+', $13
         17        ECHO                                                     ~14
         18      > RETURN                                                   1

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

End of function __destruct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.09 ms | 1430 KiB | 16 Q