Skip to content

Commit 0ea35d6

Browse files
committed
docs: do not recomment to use PHP function
It is a bad practice.
1 parent 93006e3 commit 0ea35d6

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

user_guide_src/source/libraries/sessions.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,13 @@ destroy()
353353
---------
354354

355355
To 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

360+
This method will work in exactly the same way as PHP's
361+
`session_destroy() <https://www.php.net/session_destroy>`_ function.
362+
362363
.. note:: This must be the last session-related operation that you do
363364
during the same request. All session data (including flashdata and
364365
tempdata) will be destroyed permanently and functions will be
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
<?php
22

3-
session_destroy();
4-
// or
53
$session->destroy();

0 commit comments

Comments
 (0)