This is a discussion on PHP Function Handling Functions within the PHP Programming forums, part of the Web Development category; Multiple calls to register_shutdown_function() can be made, and each will be called in the same order as they were registered. ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Multiple calls to register_shutdown_function() can be made, and each will be called in the same order as they were registered. If you call exit() within one registered shutdown function, processing will stop completely and no other registered shutdown functions will be called.
__________________ With, J. Jeyaseelan Everything Possible |
| Sponsored Links |
| |||
| In PHP 4.0.6 and earlier under Apache, the registered shutdown functions are called after the request has been completed (including sending any output buffers), so it is not possible to send output to the browser using echo() or print(), or retrieve the contents of any output buffers using ob_get_contents(). Since PHP 4.1, 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 function is called after closing all opened output buffers thus, for example, its output will not be compressed if zlib.output_compression is enabled.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| 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.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| Working directory of the script can change inside the shutdown function under some web servers, e.g. Apache. Shutdown function is called during the script shutdown so headers are always already sent.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| register_tick_function() registers the function named by func to be executed when a tick is called. Also, you may pass an array consisting of an object and a method as the func. register_tick_function() example PHP Code:
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| register_tick_function() should not be used with threaded webserver modules. Ticks are not working in ZTS mode and may crash your webserver.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| unregister_tick_function() De-registers the function named by function_name so it is no longer executed when a tick is called.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| A tick is an event that occurs for every N low-level statements executed by the parser within the declare block. The value for N is specified using ticks=N within the declare blocks's directive section. The event(s) that occur on each tick are specified using the register_tick_function(). See the example below for more details. Note that more than one event can occur for each tick.
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| hi, I want to ask you the question to use these Function handling function in PHP? Anyway is it helpful to the PHP programmers?
__________________ With, J. Jeyaseelan Everything Possible |
| |||
| The function-handling functions provide developers with tools to call, define, and test functions. The function-handling functions are a core part of PHP. They allow the programmer to easily do the following tasks:
__________________ With, J. Jeyaseelan Everything Possible |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error Handling in PHP | sivaramakrishnan | PHP Programming | 13 | 09-21-2007 05:03 AM |
| File Handling in PHP | ragavraj | PHP Programming | 20 | 09-12-2007 11:46 PM |
| How can I do error handling in php? | itbarota | PHP Programming | 1 | 09-12-2007 03:56 AM |
| How can I do error handling in php? | itbarota | PHP Programming | 0 | 09-12-2007 12:39 AM |
| Diff inline function and ordinary function | vigneshgets | C and C++ Programming | 1 | 05-24-2007 11:34 AM |