What potential SEO implications should be considered when using temporary redirects in PHP?

When using temporary redirects in PHP, it's important to consider the potential SEO implications. Temporary redirects (HTTP status code 302) may not pass on link equity to the new URL, which can impact the SEO value of the redirected page. To avoid this issue, consider using permanent redirects (HTTP status code 301) instead to ensure that the SEO value of the original page is transferred to the new URL.

header("HTTP/1.1 301 Moved Permanently");
header("Location: https://www.example.com/new-page");
exit();