3v4l.org

run code in 300+ PHP versions simultaneously
<?php function eh($type, $message, $file, $line, $context) { throw new Exception(); } set_error_handler('eh'); try { $a->b; } catch (\Exception $e) { print_r($e->getTrace()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 6
Branch analysis from position: 6
2 jumps found. (Code = 107) Position 1 = 7, Position 2 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6U3Yd
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'set_error_handler'
          1        SEND_VAL                                                 'eh'
          2        DO_ICALL                                                 
   11     3        FETCH_OBJ_R                                      ~3      !0, 'b'
          4        FREE                                                     ~3
          5      > JMP                                                      ->12
   12     6  E > > CATCH                                       last         'Exception'
   13     7    >   INIT_FCALL                                               'print_r'
          8        INIT_METHOD_CALL                                         !1, 'getTrace'
          9        DO_FCALL                                      0  $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                                 
   14    12    > > RETURN                                                   1

Function eh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/6U3Yd
function name:  eh
number of ops:  9
compiled vars:  !0 = $type, !1 = $message, !2 = $file, !3 = $line, !4 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV                                             !4      
    5     5        NEW                                              $5      'Exception'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $5
    6     8*     > RETURN                                                   null

End of function eh

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.92 ms | 1395 KiB | 17 Q