What is the purpose of using session_register_shutdown()?

Pooya sanaei

I just want to find out when and why we should use session_register_shutdown(). please don't copy descriptions from php.net. Thanks

lxg

A shutdown function is the equivalent of a destructor for code that is not object-oriented.

You can register a shutdown function if you want something to be executed if a certain component is no longer needed and you want to take an action, e.g. some sort of clean-up.

The session shutdown function is called when the session is destroyed, giving you the opportunity to perform a final action with the session before it isn't available anymore (e.g. you could extract parameters from the $_SESSION variable).

Usually, you will not need to use this function.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

What does session_register_shutdown actually do?

From Dev

What is the purpose of using session in WCF

From Java

What is the purpose of using HKDF?

From Dev

What is Purpose of @using in BeginForm

From Dev

What is the purpose of using ~ in JavaScript?

From Dev

What is Purpose of @using in BeginForm

From Dev

BASH: What is the purpose of using `/` in a list?

From Dev

What is the purpose of using nginx with gunicorn?

From Dev

what is the purpose of using JSON in android?

From Dev

BASH: What is the purpose of using `/` in a list?

From Dev

What is the purpose of xorps on the same register?

From Dev

What is the purpose/benefit of Session::registerBag()?

From Dev

What is the purpose/benefit of Session::registerBag()?

From Dev

what is the purpose of using template.library() and @register.filter() in the below code

From Dev

What is the purpose of using #define to define a constant with no value?

From Dev

What's the purpose of using semicolon in if condition?

From Dev

When using a JsonWriter, what's the purpose of WriteStartConstructor?

From Dev

What is the purpose of using genetic algorithm in learning an ANN

From Dev

What is the purpose of using prototype and static method in this factory?

From Dev

What is the purpose of using new operator in this example?

From Dev

what is the purpose of using ":" in OCaml function declaration

From Dev

What is Purpose of using mysql_secure_installation?

From Dev

What is the purpose of using glib typedefs (gint etc)?

From Dev

What is the purpose of this pattern using a volatile pointer to "this"?

From Dev

what is the purpose of using square brackets in json?

From Dev

What is the purpose of this pattern using a volatile pointer to "this"?

From Dev

What is the purpose of using shift in shell scripts?

From Dev

What is the purpose of using prototype and static method in this factory?

From Dev

What's the purpose of using `sudo -S` explicitly?

Related Related

  1. 1

    What does session_register_shutdown actually do?

  2. 2

    What is the purpose of using session in WCF

  3. 3

    What is the purpose of using HKDF?

  4. 4

    What is Purpose of @using in BeginForm

  5. 5

    What is the purpose of using ~ in JavaScript?

  6. 6

    What is Purpose of @using in BeginForm

  7. 7

    BASH: What is the purpose of using `/` in a list?

  8. 8

    What is the purpose of using nginx with gunicorn?

  9. 9

    what is the purpose of using JSON in android?

  10. 10

    BASH: What is the purpose of using `/` in a list?

  11. 11

    What is the purpose of xorps on the same register?

  12. 12

    What is the purpose/benefit of Session::registerBag()?

  13. 13

    What is the purpose/benefit of Session::registerBag()?

  14. 14

    what is the purpose of using template.library() and @register.filter() in the below code

  15. 15

    What is the purpose of using #define to define a constant with no value?

  16. 16

    What's the purpose of using semicolon in if condition?

  17. 17

    When using a JsonWriter, what's the purpose of WriteStartConstructor?

  18. 18

    What is the purpose of using genetic algorithm in learning an ANN

  19. 19

    What is the purpose of using prototype and static method in this factory?

  20. 20

    What is the purpose of using new operator in this example?

  21. 21

    what is the purpose of using ":" in OCaml function declaration

  22. 22

    What is Purpose of using mysql_secure_installation?

  23. 23

    What is the purpose of using glib typedefs (gint etc)?

  24. 24

    What is the purpose of this pattern using a volatile pointer to "this"?

  25. 25

    what is the purpose of using square brackets in json?

  26. 26

    What is the purpose of this pattern using a volatile pointer to "this"?

  27. 27

    What is the purpose of using shift in shell scripts?

  28. 28

    What is the purpose of using prototype and static method in this factory?

  29. 29

    What's the purpose of using `sudo -S` explicitly?

HotTag

Archive