3v4l.org

run code in 300+ PHP versions simultaneously
<?php function error_handler($errno, $errstr, $errfile, $errline) { $a = func_get_args(); var_dump($a); } set_error_handler("error_handler"); try { $x = new NonexistantClass(); } catch (Exception $e) { var_dump($e->getMessage()); } catch (Error $e) { var_dump($e); } echo "Don't worry, everything is still fine!\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 14
2 jumps found. (Code = 107) Position 1 = 15, Position 2 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 14
Branch analysis from position: 14
filename:       /in/SJpJi
function name:  (null)
number of ops:  20
compiled vars:  !0 = $x, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'error_handler'
          2        DO_ICALL                                                 
   11     3        NEW                                              $3      'NonexistantClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
          6      > JMP                                                      ->18
   12     7  E > > CATCH                                                    'Exception', ->14
   13     8    >   INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'getMessage'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
         13      > JMP                                                      ->18
   14    14  E > > CATCH                                       last         'Error'
   15    15    >   INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   18    18    >   ECHO                                                     'Don%27t+worry%2C+everything+is+still+fine%21%0A'
         19      > RETURN                                                   1

Function error_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SJpJi
function name:  error_handler
number of ops:  10
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    4     4        FUNC_GET_ARGS                                    ~5      
          5        ASSIGN                                                   !4, ~5
    5     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !4
          8        DO_ICALL                                                 
    6     9      > RETURN                                                   null

End of function error_handler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.25 ms | 1396 KiB | 17 Q