Doc #79771 [Opn->Ver]: Data type mismatch on the documentation page
| From: | cmb@php.net | Date: | Thu, 02 Jul 2020 12:15:30 +0000 |
| Subject: | Doc #79771 [Opn->Ver]: Data type mismatch on the documentation page | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-17682@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79771&edit=1
ID: 79771
Updated by: cmb@php.net
Reported by: reimo at warranty dot ee
Summary: Data type mismatch on the documentation page
-Status: Open
+Status: Verified
Type: Documentation Problem
-Package: Documentation problem
+Package: Session related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
As of PHP 7.1.0, the return type is actually int, and is supposed
to be the number of garbage collected (i.e. deleted) sessions.
Previously, the return type was bool, signaling success or
failure.
Previous Comments:
------------------------------------------------------------------------
[2020-07-02 11:24:12] reimo at warranty dot ee
Description:
------------
---
From manual page: https://php.net/sessionhandler.gc
---
There seems to be data type mismatch on the documentation page https://www.php.net/manual/en/sessionhandler.gc.php
where in the method declaration it is mentioned INT as a return type but later in the Return Values
section it is mentioned BOOLEAN (TRUE, FALSE) type.
Test script:
---------------
I defined gc method for a custom session handler as:
public function gc($maxlifetime): bool
and it worked as expected. Platform: Debian 10, PHP 7.3.14
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79771&edit=1