session_regenerate_id

PHP 4 >= 4.3.2, PHP 5, PHP 7, PHP 8
session_regenerate_id - Update the current session id with a newly generated one
Manual
Code Examples

Example #1 A session_regenerate_id example

PHP Version:

Example #2 Avoiding lost session by session_regenerate_id

PHP Version: