tags:

views:

98

answers:

2

using register_shutdown_function I can register code to execute at the end of a PHP script execution "no matter what".

Can I have more than one function registered?

This question arises since I may not know if someone has already registered one when I'm about to register my own.

Thanks.

+4  A: 

Nevermind, the answer is yes. I RTFM:

http://ca3.php.net/register_shutdown_function

Allain Lalonde
FYI, someone figured out the order they are executed at shutdown (as well as the order of any __destruct methods defined), if that interests you: http://www.php.net/manual/en/language.oop5.decon.php#76710
joelhardi
A: 

Yes, each will be called in the order it was registered, per the PHP documentation.

theraccoonbear