3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public function __construct() { throw new Exception('Hi!'); } public function __destruct() { throw new Exception('Bye!'); } } try { new C; } catch (Exception $e) {}
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
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
filename:       /in/dKG6s
function name:  (null)
number of ops:  6
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        FREE                                                     $1
          3      > JMP                                                      ->5
   14     4  E > > CATCH                                       last         'Exception'
          5    > > RETURN                                                   1

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

End of function __construct

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

End of function __destruct

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.3 ms | 1394 KiB | 13 Q