3v4l.org

run code in 300+ PHP versions simultaneously
<?php class e extends ErrorException { function __destruct() { echo "__destruct<br>\n"; } } function error($code, $message, $file = null, $line = 0) { echo "convert error to exception<br>\n"; throw new e($message, $code, null, $file, $line); } function shutdown() { echo "shutdown function called<br>\n"; } set_error_handler('error'); register_shutdown_function('shutdown'); try { echo $crypto->compress(); } catch (\Exception $e) { echo "exception catched<br>\n"; } echo "after fatal error<br>\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tvWJZ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $crypto, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'error'
          2        DO_ICALL                                                 
   19     3        INIT_FCALL                                               'register_shutdown_function'
          4        SEND_VAL                                                 'shutdown'
          5        DO_ICALL                                                 
   22     6        INIT_METHOD_CALL                                         !0, 'compress'
          7        DO_FCALL                                      0  $4      
          8        ECHO                                                     $4
          9      > JMP                                                      ->12
   23    10  E > > CATCH                                       last         'Exception'
   24    11    >   ECHO                                                     'exception+catched%3Cbr%3E%0A'
   27    12    >   ECHO                                                     'after+fatal+error%3Cbr%3E%0A'
         13      > RETURN                                                   1

Function error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/tvWJZ
function name:  error
number of ops:  14
compiled vars:  !0 = $code, !1 = $message, !2 = $file, !3 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      0
   10     4        ECHO                                                     'convert+error+to+exception%3Cbr%3E%0A'
   11     5        NEW                                              $4      'e'
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !0
          8        SEND_VAL_EX                                              null
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !3
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $4
   12    13*     > RETURN                                                   null

End of function error

Function shutdown:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tvWJZ
function name:  shutdown
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'shutdown+function+called%3Cbr%3E%0A'
   16     1      > RETURN                                                   null

End of function shutdown

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

End of function __destruct

End of class e.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.69 ms | 1400 KiB | 17 Q