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()); } echo "Don't worry, everything is still fine!\n";
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: 7
Branch analysis from position: 7
2 jumps found. (Code = 107) Position 1 = 8, Position 2 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nsrfH
function name:  (null)
number of ops:  15
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                                                      ->13
   12     7  E > > CATCH                                       last         'Exception'
   13     8    >   INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'getMessage'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
   16    13    >   ECHO                                                     'Don%27t+worry%2C+everything+is+still+fine%21%0A'
         14      > RETURN                                                   1

Function error_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nsrfH
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:
156.28 ms | 1396 KiB | 17 Q