Google News
logo
PHP - Interview Questions
What is garbage collection?
It is an automated feature of PHP.
 
When it runs, it removes all session data which are not accessed for a long time. It runs on /tmp directory which is the default session directory.
 
PHP directives which are used for garbage collection include :
 
* session.gc_maxlifetime (default value, 1440)
* session.gc_probability (default value, 1)
* session.gc_divisor (default value, 100)
Advertisement