Recently I\'ve noticed that many blank sessions are being created, I\'m not sure why though as I believe I\'m doing everything the correct way.
At the moment we crea
bool session_regenerate_id([bool $delete_old_session = false]);
view php manual for more information.
session_regenerate_id() will replace the current session id with a new one, and keep the current session information.
the old session file is kept and a new session file is generated every time that session_register_id() is ran. session_register_id() creates a new session with a new session_id but retains the old session information, so yes, your session_register_id() is keeping the old session files to null after updating the information to the new session file.