3v4l.org

run code in 500+ PHP versions simultaneously
<?php function handleError($errno, $errstr, $errfile, $errline) { global $php_errormsg; var_dump($php_errormsg); var_dump(error_get_last()); } function shutdownFunc() { var_dump(error_get_last()); } set_error_handler('handleError'); register_shutdown_function('shutdownFunc'); if ($x) { echo "x\n"; } else { echo "no x\n"; } var_dump(error_get_last()); nosuchfunc();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QKQKY
function name:  (null)
number of ops:  18
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                                   'set_error_handler'
          1        SEND_VAL                                                     'handleError'
          2        DO_ICALL                                                     
   15     3        INIT_FCALL                                                   'register_shutdown_function'
          4        SEND_VAL                                                     'shutdownFunc'
          5        DO_ICALL                                                     
   17     6      > JMPZ                                                         !0, ->9
   18     7    >   ECHO                                                         'x%0A'
   17     8      > JMP                                                          ->10
   20     9    >   ECHO                                                         'no+x%0A'
   23    10    >   INIT_FCALL                                                   'var_dump'
         11        INIT_FCALL                                                   'error_get_last'
         12        DO_ICALL                                             $3      
         13        SEND_VAR                                                     $3
         14        DO_ICALL                                                     
   25    15        INIT_FCALL_BY_NAME                                           'nosuchfunc'
         16        DO_FCALL                                          0          
         17      > RETURN                                                       1

Function handleerror:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QKQKY
function name:  handleError
number of ops:  14
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $php_errormsg
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        BIND_GLOBAL                                                  !4, 'php_errormsg'
    6     5        INIT_FCALL                                                   'var_dump'
          6        SEND_VAR                                                     !4
          7        DO_ICALL                                                     
    7     8        INIT_FCALL                                                   'var_dump'
          9        INIT_FCALL                                                   'error_get_last'
         10        DO_ICALL                                             $6      
         11        SEND_VAR                                                     $6
         12        DO_ICALL                                                     
    8    13      > RETURN                                                       null

End of function handleerror

Function shutdownfunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QKQKY
function name:  shutdownFunc
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_FCALL                                                   'error_get_last'
          2        DO_ICALL                                             $0      
          3        SEND_VAR                                                     $0
          4        DO_ICALL                                                     
   12     5      > RETURN                                                       null

End of function shutdownfunc

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.63 ms | 2795 KiB | 17 Q