3v4l.org

run code in 300+ PHP versions simultaneously
<?php function obh($b) { return 'obh'.$b; } function error($code, $message, $file = null, $line = 0) { ob_start('obh'); echo "convert error to exception<br>\n"; throw new \ErrorException($message, $code, null, $file, $line); } function shutdown() { echo "shutdown function called<br>\n"; } function ex($e) { echo "exception handler called<br>\n"; } set_exception_handler('ex'); set_error_handler('error'); register_shutdown_function('shutdown'); try { echo $crypto->compress(); } catch (\Exception $e) { echo "exception catched<br>\n"; } echo "after fatal error<br>\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 13
Branch analysis from position: 13
2 jumps found. (Code = 107) Position 1 = 14, Position 2 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fb41Z
function name:  (null)
number of ops:  17
compiled vars:  !0 = $crypto, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'set_exception_handler'
          1        SEND_VAL                                                 'ex'
          2        DO_ICALL                                                 
   22     3        INIT_FCALL                                               'set_error_handler'
          4        SEND_VAL                                                 'error'
          5        DO_ICALL                                                 
   23     6        INIT_FCALL                                               'register_shutdown_function'
          7        SEND_VAL                                                 'shutdown'
          8        DO_ICALL                                                 
   26     9        INIT_METHOD_CALL                                         !0, 'compress'
         10        DO_FCALL                                      0  $5      
         11        ECHO                                                     $5
         12      > JMP                                                      ->15
   27    13  E > > CATCH                                       last         'Exception'
   28    14    >   ECHO                                                     'exception+catched%3Cbr%3E%0A'
   31    15    >   ECHO                                                     'after+fatal+error%3Cbr%3E%0A'
         16      > RETURN                                                   1

Function obh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fb41Z
function name:  obh
number of ops:  4
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        CONCAT                                           ~1      'obh', !0
          2      > RETURN                                                   ~1
    5     3*     > RETURN                                                   null

End of function obh

Function error:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/fb41Z
function name:  error
number of ops:  17
compiled vars:  !0 = $code, !1 = $message, !2 = $file, !3 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      0
    8     4        INIT_FCALL                                               'ob_start'
          5        SEND_VAL                                                 'obh'
          6        DO_ICALL                                                 
    9     7        ECHO                                                     'convert+error+to+exception%3Cbr%3E%0A'
   10     8        NEW                                              $5      'ErrorException'
          9        SEND_VAR_EX                                              !1
         10        SEND_VAR_EX                                              !0
         11        SEND_VAL_EX                                              null
         12        SEND_VAR_EX                                              !2
         13        SEND_VAR_EX                                              !3
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $5
   11    16*     > RETURN                                                   null

End of function error

Function shutdown:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fb41Z
function name:  shutdown
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                     'shutdown+function+called%3Cbr%3E%0A'
   15     1      > RETURN                                                   null

End of function shutdown

Function ex:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fb41Z
function name:  ex
number of ops:  3
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        ECHO                                                     'exception+handler+called%3Cbr%3E%0A'
   19     2      > RETURN                                                   null

End of function ex

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.96 ms | 1400 KiB | 21 Q