src/SessionInstance.php
public function regenerate()
    {
        $this->init();

        # Generate a new session
        session_start();
        session_regenerate_id();

        # Get the newly generated ID
        $this->id = session_id();

        # Remove the lock from the session file
        session_write_close();

        return $this->id;
    }
public function regenerate()
    {
        $this->init();

        # Generate a new session
        session_start();
        session_regenerate_id();

        # Get the newly generated ID
        $this->id = session_id();

        # Remove the lock from the session file
        session_write_close();

        return $this->id;
    }
public function regenerate ( ) { $ this -> init ( ) ; # Generate a new session session_start ( ) ; session_regenerate_id ( ) ; # Get the newly generated ID $ this -> id = session_id ( ) ; # Remove the lock from the session file session_write_close ( ) ; return $ this -> id ; }
Update the current session id with a newly generated one.

@return string The new session ID
Update the current session id with a newly generated one .