3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function($num, $msg, $file, $line) { // Convert to exceptions throw new ErrorException($msg, 0, $num, $file, $line); }); set_exception_handler(function($e) { // Print or log to file echo get_class($e).': '.$e->getMessage().' ['.$e->getFile().':'.$e->getLine().']'; }); try { // Will be caught echo array(); } catch(ErrorException $e) {} // Will not be caught echo array();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 10
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
filename:       /in/c637v
function name:  (null)
number of ops:  13
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%2Fc637v%3A3%240'
    7     2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    8     4        INIT_FCALL                                               'set_exception_handler'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fc637v%3A8%241'
   12     6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   17     8        ECHO                                                     <array>
          9      > JMP                                                      ->11
   19    10  E > > CATCH                                       last         'ErrorException'
   22    11    >   ECHO                                                     <array>
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fc637v%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/c637v
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      
    6     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
    7    12*     > RETURN                                                   null

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

Function %00%7Bclosure%7D%2Fin%2Fc637v%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c637v
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   11     1        GET_CLASS                                        ~1      !0
          2        CONCAT                                           ~2      ~1, '%3A+'
          3        INIT_METHOD_CALL                                         !0, 'getMessage'
          4        DO_FCALL                                      0  $3      
          5        CONCAT                                           ~4      ~2, $3
          6        CONCAT                                           ~5      ~4, '+%5B'
          7        INIT_METHOD_CALL                                         !0, 'getFile'
          8        DO_FCALL                                      0  $6      
          9        CONCAT                                           ~7      ~5, $6
         10        CONCAT                                           ~8      ~7, '%3A'
         11        INIT_METHOD_CALL                                         !0, 'getLine'
         12        DO_FCALL                                      0  $9      
         13        CONCAT                                           ~10     ~8, $9
         14        CONCAT                                           ~11     ~10, '%5D'
         15        ECHO                                                     ~11
   12    16      > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.12 ms | 1400 KiB | 17 Q