473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

register_shutdown_function order

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
1 2098
<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joshua Beall | last post by:
Hi All, I use register_shutdown_function to register a function that then gets run when the script finishes executing. It worked great before, but sometime last week on my development server...
3
by: Derek Battams | last post by:
I want to ensure that I'm releasing a lock on a file after _all_ objects have been destroyed. What I'm trying to do is use register_shutdown_function to call a function that releases the lock on...
1
by: yawnmoth | last post by:
Say I have the following PHP script: <? register_shutdown_function('test'); ob_start(); echo "part2"; function test() { $output = ob_get_contents();
7
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
9
by: Steven T. Hatton | last post by:
The following works: template <typename T> struct ID3M{ static const T ID; }; template <typename T> const T ID3M<T>::ID = {{1,0,0},{0,1,0},{0,0,1}};
15
by: | last post by:
The data file is a simple Unicode file with lines of text. BCP apparently doesn't guarantee this ordering, and neither does the import tool. I want to be able to load the data either sequentially...
2
by: alex bazan | last post by:
I came across this function as i got a problem with very long-running scripts which use transactions... in the php manual i do not see clearly stated if the function defined will be executed if...
13
by: bevanward | last post by:
Hi All I am finding unexpected results when inserted into a newly created table that has a field of datatype int identity (1,1). Basically the order I sort on when inserting into the table is...
25
by: DanicaDear | last post by:
Hello again Bytes...I missed you! First, background: In a hotstick lab, we ship orders every two years. We ship a new order and the customer uses the new box to return the previous year's order....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.