3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (true){ set_error_handler(function($a, $b, $c, $d){ var_dump('error_handler', $a, $b, $c, $d); }); } $var = 1; try { $var->method(); // Throws an Error object in PHP 7. } catch (Error $e) { // Handle error var_dump('error', $e); } catch (Exception $e) { // Handle error var_dump('exception', $e); } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 5
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 15
2 jumps found. (Code = 107) Position 1 = 16, Position 2 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 15
Branch analysis from position: 15
filename:       /in/c4UaD
function name:  (null)
number of ops:  21
compiled vars:  !0 = $var, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > JMPZ                                                     <true>, ->5
    3     1    >   INIT_FCALL                                               'set_error_handler'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fc4UaD%3A3%240'
    5     3        SEND_VAL                                                 ~2
          4        DO_ICALL                                                 
    8     5    >   ASSIGN                                                   !0, 1
   11     6        INIT_METHOD_CALL                                         !0, 'method'
          7        DO_FCALL                                      0          
          8      > JMP                                                      ->20
   12     9  E > > CATCH                                                    'Error', ->15
   14    10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAL                                                 'error'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
         14      > JMP                                                      ->20
   15    15  E > > CATCH                                       last         'Exception'
   17    16    >   INIT_FCALL                                               'var_dump'
         17        SEND_VAL                                                 'exception'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   19    20    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fc4UaD%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c4UaD
function name:  {closure}
number of ops:  12
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
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        INIT_FCALL                                               'var_dump'
          5        SEND_VAL                                                 'error_handler'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                                 
    5    11      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.47 ms | 1400 KiB | 17 Q