Can session_register_shutdown() always trigger in Nginx + PHP-FPM environment?
In PHP's session management mechanism, the session_register_shutdown() function is a relatively new feature. It is used to register a callback function and is automatically called when the script is executed and the session is closed. The original intention of this mechanism is to ensure that at the end of the request, all changes to $_SESSION can be safely written back, thus avoiding the loss of session data due to script exceptions or early exit.
session_register_shutdown