PHP What is the purpose of $_SESSION[]? June 10, 2015 Pramod T P Leave a comment Used to store variables of the current session. The purpose of the function $_SESSION[] is to store data that you would like to preserve across page loads and to store variables of current session.