Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fgunz06's avatar

Run function when session expire

How can I run a function when session expires.

0 likes
4 replies
vandan's avatar

Try settings callbacks in session_set_save_handler on close and gc (garbage collector).

fgunz06's avatar

@SNAPEY - Im trying to call a query when session expires cause I have a column I have to update before user session expire/logout

Please or to participate in this conversation.