I need to overload the die() function. For example, I want to pass an extra parameter to die() function which is when set to true, it sends an email to me that something abnormal happened to the site. Can you please help me out!!!
Thanks to all...
Hi all ... I need to overload the die() function.
No, you don't.
You could use set_error_handler or register_shutdown_function to run some code on a PHP error.
I'll leave it as an exercise to the reader to check through the documentation and experiment to see which shutdown scenarios these functions will be triggered for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With