What are the potential problems with using header redirection for opening new windows in PHP?

Potential problems with using header redirection for opening new windows in PHP include the inability to control the window size, lack of ability to set window features (such as scrollbars or status bar), and potential security risks if the URL being redirected to is user-controlled. To open a new window in PHP with specific window features and size, you can use JavaScript instead of header redirection. Here's an example code snippet:

<?php
echo '<script>window.open("https://www.example.com", "_blank", "width=500,height=500,scrollbars=yes,status=yes");</script>';
?>