1.

Which function effectively deletes all sessions that have expired?(a) session_delete()(b) session_destroy()(c) session_garbage_collect()(d) SessionHandler::gcThe question was posed to me in an international level competition.Asked question is from Session Handling-2 topic in section File and Session Handling in PHP of PHP

Answer» CORRECT option is (d) SessionHandler::gc

For EXPLANATION: SessionHandler::gc is used to clean up expired SESSIONS. It is CALLED randomly by PHP internally when a session_start() is invoked.


Discussion

No Comment Found

Related InterviewSolutions