Doc #79771 [Ver->Csd]: Data type mismatch on the documentation page
| From: | cmb@php.net | Date: | Tue, 13 Apr 2021 13:19:37 +0000 |
| Subject: | Doc #79771 [Ver->Csd]: Data type mismatch on the documentation page | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18706@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: Verified
+Status: Closed
Type: Documentation Problem
Package: Session related
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This has been fixed in the meantime[1].
[1] <https://github.com/php/doc-en/commit/151e61773c016edcae8fd4989ad9a86ffd03c283>
Previous Comments:
------------------------------------------------------------------------
[2020-07-02 12:15:30] cmb@php.net
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.
------------------------------------------------------------------------
[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