By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

register_shutdown_function order

P: n/a
Hi all !

I am using register_shutdown_function. It behaves something
strange.

register_shutdown_function("f1");
register_shutdown_function("f2");

they fire in sequence
f1
f2

One would expect them to fire
f2
f1

Lets assume that I want to use tracer and db access.
f1 - should close the tracer
f2 - should close db connection
It's bug or feature ?

Regards

Matjaz
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
<ma*****************@zrs-tk.si> wrote:
I am using register_shutdown_function. It behaves something
strange.

register_shutdown_function("f1");
register_shutdown_function("f2");

they fire in sequence
f1
f2
Correct:

<quote>Multiple calls to register_shutdown_function() can be made, and
each will be called in the same order as they were registered.</quote>
One would expect them to fire
f2
f1


Why? It's not meant to be a stack.

JOn
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.