3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $v; public function __destruct() { echo "Hello there"; } } class B { public $v; public function __destruct() { echo " from the other side"; } } $a = new A(); $b = new B(); $a->v = $b; $b->v = $a; echo "Before exit\n"; exit(4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/gO9IK
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        NEW                                              $5      'B'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   18     6        ASSIGN_OBJ                                               !0, 'v'
          7        OP_DATA                                                  !1
   19     8        ASSIGN_OBJ                                               !1, 'v'
          9        OP_DATA                                                  !0
   21    10        ECHO                                                     'Before+exit%0A'
   22    11      > EXIT                                                     4
         12*     > RETURN                                                   1

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

End of function __destruct

End of class A.

Class B:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gO9IK
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     '+from+the+other+side'
   13     1      > RETURN                                                   null

End of function __destruct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.43 ms | 995 KiB | 13 Q