File tree Expand file tree Collapse file tree
user_guide_src/source/libraries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -353,16 +353,18 @@ destroy()
353353---------
354354
355355To clear the current session (for example, during a logout), you may
356- simply use either PHP's `session_destroy() <https://www.php.net/session_destroy >`_
357- function, or the library's ``destroy() `` method. Both will work in exactly the
358- same way:
356+ simply use the library's ``destroy() `` method:
359357
360358.. literalinclude :: sessions/037.php
361359
362- .. note :: This must be the last session-related operation that you do
363- during the same request. All session data (including flashdata and
364- tempdata) will be destroyed permanently and functions will be
365- unusable during the same request after you destroy the session.
360+ This method will work in exactly the same way as PHP's
361+ `session_destroy() <https://www.php.net/session_destroy >`_ function.
362+
363+ This must be the last session-related operation that you do during the same request.
364+ All session data (including flashdata and tempdata) will be destroyed permanently.
365+
366+ .. note :: You do not have to call this method from usual code. Cleanup session
367+ data rather than destroying the session.
366368
367369.. _session-stop :
368370
Original file line number Diff line number Diff line change 11<?php
22
3- session_destroy ();
4- // or
53$ session ->destroy ();
You can’t perform that action at this time.
0 commit comments