Home > PHP > Function > Sessions > session_regenerate_id()

session_regenerate_id()

session_regenerate_id - Update the current session id with a newly generated one

Syntax

bool session_regenerate_id (bool $delete_old_session)

Arguments

  • delete_old_session - Whether to delete the old associated session file or not.

Description

session_regenerate_id() will replace the current session id with a new one, and keep the current session information.

Version

PHP 4.3.2, 5

Return value

Returns TRUE on success or FALSE on failure.