3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* final public ExceptionException::getPrevious ( void ) final public stringException::getFile ( void ) final private voidException::__clone ( void ) */ error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { throw new ErrorException($errstr, '00007600', $errno, $errfile, $errline); } set_error_handler("exception_error_handler"); try { echo $x; } catch(Exception $e) { echo 'exception \'' . get_class($e) . '\' with message \'' . $e->getMessage() . '\' in \'' . $e->getFile() . '\':' . $e->getLine() . PHP_EOL; echo $e->getTraceAsString(); echo PHP_EOL . '-----------------------' . PHP_EOL; echo $e->__toString(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) 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/NafoQ
function name:  (null)
number of ops:  33
compiled vars:  !0 = $x, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   19     3        INIT_FCALL                                               'set_error_handler'
          4        SEND_VAL                                                 'exception_error_handler'
          5        DO_ICALL                                                 
   29     6        ECHO                                                     !0
          7      > JMP                                                      ->32
   31     8  E > > CATCH                                       last         'Exception'
   32     9    >   GET_CLASS                                        ~4      !1
         10        CONCAT                                           ~5      'exception+%27', ~4
         11        CONCAT                                           ~6      ~5, '%27+with+message+%27'
         12        INIT_METHOD_CALL                                         !1, 'getMessage'
         13        DO_FCALL                                      0  $7      
         14        CONCAT                                           ~8      ~6, $7
         15        CONCAT                                           ~9      ~8, '%27+in+%27'
         16        INIT_METHOD_CALL                                         !1, 'getFile'
         17        DO_FCALL                                      0  $10     
         18        CONCAT                                           ~11     ~9, $10
         19        CONCAT                                           ~12     ~11, '%27%3A'
         20        INIT_METHOD_CALL                                         !1, 'getLine'
         21        DO_FCALL                                      0  $13     
         22        CONCAT                                           ~14     ~12, $13
         23        CONCAT                                           ~15     ~14, '%0A'
         24        ECHO                                                     ~15
   33    25        INIT_METHOD_CALL                                         !1, 'getTraceAsString'
         26        DO_FCALL                                      0  $16     
         27        ECHO                                                     $16
   34    28        ECHO                                                     '%0A-----------------------%0A'
   35    29        INIT_METHOD_CALL                                         !1, '__toString'
         30        DO_FCALL                                      0  $17     
         31        ECHO                                                     $17
   36    32    > > RETURN                                                   1

Function exception_error_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/NafoQ
function name:  exception_error_handler
number of ops:  13
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   17     4        NEW                                              $4      'ErrorException'
          5        SEND_VAR_EX                                              !1
          6        SEND_VAL_EX                                              '00007600'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $4
   18    12*     > RETURN                                                   null

End of function exception_error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.51 ms | 1400 KiB | 17 Q