|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79771 Data type mismatch on the documentation page
Submitted: 2020-07-02 11:24 UTC Modified: 2020-07-02 12:15 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: reimo at warranty dot ee Assigned:
Status: Verified Package: Session related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-07-02 11:24 UTC] reimo at warranty dot ee
From manual page:
There seems to be data type mismatch on the documentation page 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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-07-02 12:15 UTC]
-Status: Open +Status: Verified -Package: Documentation problem +Package: Session related
 [2020-07-02 12:15 UTC]
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
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Mar 04 07:01:26 2021 UTC