php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80251 session_cache_expire() expects int
Submitted: 2020-10-17 15:14 UTC Modified: 2020-12-09 12:57 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: a dot vysotsky at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Session related
PHP Version: PHP 8 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: a dot vysotsky at gmail dot com
New email:
PHP Version: OS:

 

 [2020-10-17 15:14 UTC] a dot vysotsky at gmail dot com
Description:
------------
---
From manual page: https://php.net/function.session-cache-expire
---

Fail input parameter type: "string" given, "int" must be.

P.S.: Don't need to select "PHP version" for documentation problem on bug report page.

P.S.2: Rename, please, "short description" to "summary" in error message "You must supply a short description of the bug you are reporting" on bug report page.


Test script:
---------------
session_cache_expire ([ string $new_cache_expire ] ) : int



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-17 15:35 UTC] cmb@php.net
-Summary: Fail input parameter type for session function +Summary: session_cache_expire() expects int -Status: Open +Status: Verified -Package: Unknown/Other Function +Package: Session related -PHP Version: master-Git-2020-10-17 (Git) +PHP Version: PHP 8
 [2020-10-17 15:35 UTC] cmb@php.net
Prior to PHP 8.0.0, session_cache_expire() actually expected a
string (whereas type juggling took place even in script_types
mode). Only as of PHP 8.0.0, the parameter is of type int.

> Don't need to select "PHP version" for documentation problem on
> bug report page.

This is why there is the option to choose "Irrelevant".  And in
this case the docs are even depending on the PHP version.

> Rename, please, "short description" to "summary" in error
> message "You must supply a short description of the bug you are
> reporting" on bug report page.

If you feel strongly about this, please open another bug report.
Also consider to submit a pull request[1].

[1] <https://github.com/php/web-bugs/pulls>
 [2020-12-09 12:57 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2020-12-09 12:57 UTC] cmb@php.net
> Prior to PHP 8.0.0, session_cache_expire() actually expected a
> string […]

Not really.

Anyhow, the docs have been fixed in the meantime, so closing.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 02 21:01:27 2025 UTC