3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __destruct() { throw new Exception('destruct'); } } try { $a = new A(); #throw new Exception('exception'); } catch (Exception $e) { echo $e->getMessage(); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 4
Branch analysis from position: 4
2 jumps found. (Code = 107) Position 1 = 5, Position 2 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uAhgj
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
          3      > JMP                                                      ->8
   14     4  E > > CATCH                                       last         'Exception'
   15     5    >   INIT_METHOD_CALL                                         !1, 'getMessage'
          6        DO_FCALL                                      0  $5      
          7        ECHO                                                     $5
   17     8    > > RETURN                                                   1

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

End of function __destruct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.72 ms | 1394 KiB | 13 Q