note 108784 added to function.register-shutdown-function
| From: | nend at gmail dot com | Date: | Thu, 24 May 2012 16:16:46 +0000 |
| Subject: | note 108784 added to function.register-shutdown-function | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188191@lists.php.net to get a copy of this message | ||
Commenting on a previous note
PHP 5.0.4:
1. ob_callback
2. shutdown_func
PHP 5.1.2:
1. shutdown_func
2. ob_callback
In PHP 5.1.2 and later if you still need the shutdown function to be after the ob callback function
you can call flush to call the ob callback then process your code.
<?php
register_shutdown_function('shutdownfunction');
function shutdownfunction() {
//force PHP to call the ob callback
if (ob_get_level() > 0) {
ob_end_flush();
}
//rest of your shutdown code here.
}
?>
----
Server IP: 64.71.164.2
Probable Submitter: 67.0.105.69
----
Manual Page -- http://www.php.net/manual/en/function.register-shutdown-function.php
Edit -- https://master.php.net/note/edit/108784
Del: integrated -- https://master.php.net/note/delete/108784/integrated
Del: useless -- https://master.php.net/note/delete/108784/useless
Del: bad code -- https://master.php.net/note/delete/108784/bad+code
Del: spam -- https://master.php.net/note/delete/108784/spam
Del: non-english -- https://master.php.net/note/delete/108784/non-english
Del: in docs -- https://master.php.net/note/delete/108784/in+docs
Del: other reasons-- https://master.php.net/note/delete/108784
Reject -- https://master.php.net/note/reject/108784
Search -- https://master.php.net/manage/user-notes.php