Join Up!
104887 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousExecution InformationCalling User Functionsnext
Last updated: Tue, 29 Oct 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German

Capítulo 37. Startup and Shutdown Functions

Startup and shutdown functions can be used for one-time initialization and deinitialization of your modules. As discussed earlier in this chapter (see the description of the Zend module descriptor block), there are global, module, and request startup and shutdown events.

The global startup functions are called once when PHP starts up; similarly, the global shutdown functions are called once when PHP shuts down. Please note that they're really only called once, not when a new Apache process is being created!

The module startup and shutdown functions are called whenever a module is loaded and needs initialization; the request startup and shutdown functions are called every time a request is processed (meaning that a file is being executed).

For dynamic extensions, module and request startup/shutdown events happen at the same time.

Declaration and implementation of these functions can be done with macros; see the earlier section "Declaration of the Zend Module Block" for details.

User Contributed Notes
Startup and Shutdown Functions
add a note about notes
There are no user contributed notes for this page.
previousExecution InformationCalling User Functionsnext
Last updated: Tue, 29 Oct 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST