Garbage Collection: On every call tosession_start()
, PHP performs a calculation that determines if expired session data should be eliminated. So a session file can be deleted after it’ssession.gc_maxlifetime
, but it may reside on the server longer, depending on the amount of sessions created. The more sessions are used on a particular server, the more frequently the possibility of garbage collection can occur. On a very quiet site, sessions could in theory last quite a long time!