src/Session/Session.php
public function regenerateId(): bool
    {
        $result = \session_regenerate_id(true);
        if ($result && $this->csrfToken) {
            $this->csrfToken->regenerateValue();
        }

        return $result;
    }
public function regenerateId(): bool
    {
        $result = \session_regenerate_id(true);
        if ($result && $this->csrfToken) {
            $this->csrfToken->regenerateValue();
        }

        return $result;
    }
public function regenerateId ( ) : bool { $ result = \ session_regenerate_id ( true ) ; if ( $ result && $ this -> csrfToken ) { $ this -> csrfToken -> regenerateValue ( ) ; } return $ result ; }
Regenerates and replaces the current session id; also regenerates the
CSRF token value if one exists.

@return bool True if regeneration worked, false if not.
Regenerates and replaces the current session id ; also regenerates the CSRF token value if one exists .