doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Description of session_cache_limiter() $value parameter is incorrect

Open jdwx opened this issue 4 months ago • 1 comments

Affected page

https://www.php.net/manual/en/function.session-cache-limiter.php

Issue description

In the description of the value parameter, there is a table listing the allowed values. In the "Headers Sent" column of the table for the public, private_no_expire and private values, the Last-Modified header is described as "(the timestamp of when the session was last saved)."

This is not correct. According to the source code at:

https://github.com/php/php-src/blob/a0b7dab64b50152ad315643b58210b535738b30e/ext/session/session.c#L1262

the actual behavior is that it takes the modification timestamp of the path found in the PATH_TRANSLATED value of the server superglobal.

Steps to reproduce

n/a

Suggested fix

Perhaps "(the timestamp of when the session was last saved)" could be replaced with "(the timestamp of the current script)."

"The current script" is the terminology used in the documentation of $_SERVER[ 'PATH_TRANSLATED' ].

jdwx avatar Sep 07 '25 23:09 jdwx