diff --git a/reference/funchand/functions/register-shutdown-function.xml b/reference/funchand/functions/register-shutdown-function.xml index 78a05412b1..32cefd4d6e 100644 --- a/reference/funchand/functions/register-shutdown-function.xml +++ b/reference/funchand/functions/register-shutdown-function.xml @@ -10,14 +10,13 @@ &reftitle.description; voidregister_shutdown_function - callbackfunction + callbackcallback mixedparameter mixed... - Registers the function named by function to be - executed when script processing is complete or when exit - is called. + Registers a callback to be executed after script + execution finishes or exit is called. Multiple calls to register_shutdown_function can be @@ -33,22 +32,14 @@ - function + callback - The shutdown function to register. + The shutdown callback to register. - The shutdown functions are called as the part of the request so that - it's possible to send the output from them. There is currently no way - to process the data with output buffering functions in the shutdown - function. - - - Shutdown functions are called after closing all opened output buffers - thus, for example, its output will not be compressed if zlib.output_compression is - enabled. + The shutdown callbacks are executed as the part of the request, so + it's possible to send output from them and access output buffers. @@ -78,6 +69,14 @@ &return.void; + + + &reftitle.errors; + + If the passed callback is not callable a E_WARNING + level error will be generated. + + &reftitle.changelog; @@ -137,16 +136,6 @@ register_shutdown_function('shutdown'); &reftitle.notes; - - - Typically undefined functions cause fatal errors in PHP, but when the - function called with - register_shutdown_function is undefined, an error - of level E_WARNING is generated instead. Also, - for reasons internal to PHP, this error will refer to - Unknown at line #0. - - Working directory of the script can change inside the shutdown function