session_get_cookie_params
(PHP 4, PHP 5, PHP 7, PHP 8)
session_get_cookie_params — セッションクッキーのパラメータを得る
説明
session_get_cookie_params():
array
セッションクッキーのパラメータを取得します。
戻り値
現在のセッションクッキーの情報を配列として返します。
この配列には次のような項目が含まれています。
変更履歴
| バージョン |
説明 |
| 7.3.0 |
返される配列に、"samesite" エントリが追加されました。
|
mmchristian at gmail dot com ¶ 9 years ago
It should be noted that this gets the session cookie ini file parameters, not the parameters from the cookie itself.
ie. if you set the cookie lifetime using session_set_cookie_params(12345) and then try to use session_get_cookie_params, you will not get back 12345. Instead, you will get the lifetime set in the ini file.