Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I Register more than one shutdown function in PHP?

Tags:

php

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.

like image 328
Allain Lalonde Avatar asked Sep 03 '25 05:09

Allain Lalonde


1 Answers

Nevermind, the answer is yes. Manual:

https://www.php.net/register_shutdown_function

like image 195
Allain Lalonde Avatar answered Sep 04 '25 20:09

Allain Lalonde