3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($num, $msg, $file, $line) { throw new ErrorException($msg, 0, $num, $file, $line); }); set_exception_handler(function($e) { echo '** Uncaught Exception **'.PHP_EOL; echo (string)toString(); }); try { // Will be caught echo array().PHP_EOL; } catch(ErrorException $e) {} // Will not be caught echo array().PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 12
Branch analysis from position: 12
2 jumps found. (Code = 107) Position 1 = 13, Position 2 = -2
Branch analysis from position: 13
filename:       /in/Gafno
function name:  (null)
number of ops:  17
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGafno%3A3%240'
    6     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    7     4        INIT_FCALL                                               'set_exception_handler'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGafno%3A7%241'
   11     6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   16     8        CAST                                          6  ~5      <array>
          9        CONCAT                                           ~6      ~5, '%0A'
         10        ECHO                                                     ~6
         11      > JMP                                                      ->13
   18    12  E > > CATCH                                       last         'ErrorException'
   20    13    >   CAST                                          6  ~7      <array>
         14        CONCAT                                           ~8      ~7, '%0A'
         15        ECHO                                                     ~8
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FGafno%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/Gafno
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $num, !1 = $msg, !2 = $file, !3 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    5     4        NEW                                              $4      'ErrorException'
          5        SEND_VAR_EX                                              !1
          6        SEND_VAL_EX                                              0
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !3
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $4
    6    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FGafno%3A3%240

Function %00%7Bclosure%7D%2Fin%2FGafno%3A7%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gafno
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ECHO                                                     '%2A%2A+Uncaught+Exception+%2A%2A%0A'
   10     2        INIT_FCALL_BY_NAME                                       'toString'
          3        DO_FCALL                                      0  $1      
          4        CAST                                          6  ~2      $1
          5        ECHO                                                     ~2
   11     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FGafno%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.13 ms | 1400 KiB | 17 Q