I have the following in my PHP header from an existing little web app. My question is: doesn't this make the page jump through an extra step to first check and then start a session? What is the point of this?
If a session exists, can't I just use session_start and if it does not won't it be ignored?
PHP
if (!isset($_SESSION)) {
session_start();
}
session_start()when there's already an existing session, it will replace that session. If it's in a place where it is only going to be called once, then it seems superfluous, but doesn't do any harm.