3v4l.org

run code in 300+ PHP versions simultaneously
<?php function handle_exception( $arg ) { echo "exception callback" . PHP_EOL; } set_exception_handler( 'handle_exception' ); function bar( $arg ) { throw new Exception( 'fail here' ); } ob_start( 'bar' ); exit;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/ep7XJ
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        SEND_VAL                                                 'handle_exception'
          2        DO_ICALL                                                 
   13     3        INIT_FCALL                                               'ob_start'
          4        SEND_VAL                                                 'bar'
          5        DO_ICALL                                                 
   15     6      > EXIT                                                     
   16     7*     > RETURN                                                   1

Function handle_exception:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ep7XJ
function name:  handle_exception
number of ops:  3
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ECHO                                                     'exception+callback%0A'
    5     2      > RETURN                                                   null

End of function handle_exception

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/ep7XJ
function name:  bar
number of ops:  6
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        NEW                                              $1      'Exception'
          2        SEND_VAL_EX                                              'fail+here'
          3        DO_FCALL                                      0          
          4      > THROW                                         0          $1
   11     5*     > RETURN                                                   null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.85 ms | 999 KiB | 15 Q