3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FBqK9U%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/BqK9U
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    5     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                                                 
    6    11        NEW                                              $5      'ErrorException'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !1
         14        SEND_VAR_EX                                              !2
         15        SEND_VAR_EX                                              !3
         16        DO_FCALL                                      0          
         17      > THROW                                         0          $5
    7    18*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBqK9U%3A4%240

Function %00%7Bclosure%7D%2Fin%2FBqK9U%3A8%241:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BqK9U
function name:  {closure}
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_R                      global              ~0      'GLOBALS'
          1        FETCH_DIM_R                                      ~1      ~0, 'success'
          2      > JMPZ                                                     ~1, ->4
          3    > > RETURN                                                   null
   11     4    >   INIT_FCALL                                               'var_dump'
          5        SEND_VAL                                                 'shutdown_function'
          6        INIT_FCALL                                               'error_get_last'
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                                 
   12    10      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FBqK9U%3A8%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.56 ms | 1400 KiB | 21 Q