3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function __construct() { echo "create\n"; } function __destruct() { echo "free\n"; } } try { $a = new a; throw new Exception (''); } catch (Exception $e) { echo "exception\n"; } var_dump($a); echo "done\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DGNHH
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        NEW                                              $5      'Exception'
          4        SEND_VAL_EX                                              ''
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $5
          7*       JMP                                                      ->10
   19     8  E > > CATCH                                       last         'Exception'
   20     9    >   ECHO                                                     'exception%0A'
   22    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   23    13        ECHO                                                     'done%0A'
         14      > RETURN                                                   1

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

End of function __construct

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

End of function __destruct

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.8 ms | 1395 KiB | 15 Q