Re: How can i get the location of an exit()/die() from within register_shutdown_function()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Mathijs van Veluw <mathijs.van.veluw@xxxxxxxxxxx>:

Hello there,

I have an shutdown function to catch fatal-errors etc..
Now when there is an exit() somewhere i get an empty message from
get_last_error().
I want to know the location of this exit() or die().

Is there a way to get the file and line-number from where the exit/die
originated?

Thx in advance.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

I don't think this is possible in PHP. When exit(0); is called. PHP execution stops. In the manual there is a small comment about exit inside a register_shutdown_function

[snip]
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.
[/snip]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux