3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function __destruct() { echo 'a dtor'; throw new Exception('Exception'); } } class B { function __destruct() { echo 'b dtor'; } } $b = new B; $a = new A;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YOms6
function name:  (null)
number of ops:  7
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    6     3        NEW                                              $5      'A'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
          6      > RETURN                                                   1

Class A:
Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/YOms6
function name:  __destruct
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'a+dtor'
          1        NEW                                              $0      'Exception'
          2        SEND_VAL_EX                                              'Exception'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $0
          5*     > 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/YOms6
function name:  __destruct
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'b+dtor'
          1      > RETURN                                                   null

End of function __destruct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.62 ms | 1394 KiB | 13 Q