|  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: 2021-04-13 13:19 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: cmb (profile)
Status: Closed Package: Session related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [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
 [2021-04-13 13:19 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-04-13 13:19 UTC]
This has been fixed in the meantime[1].

[1] <>
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 21:05:51 2022 UTC