What are the pitfalls of relying on meta refresh for automatic page redirection in PHP?

Relying on meta refresh for automatic page redirection in PHP can have pitfalls such as decreased SEO performance, potential accessibility issues, and a lack of control over the redirection process. To solve this issue, it is recommended to use PHP header() function for server-side redirection, which provides better control and performance.

<?php
// Redirect to a new page using PHP header function
header("Location: newpage.php");
exit();
?>