What are the potential pitfalls of combining HTML and XML tags in PHP scripts?

Mixing HTML and XML tags in PHP scripts can cause parsing errors and make the code harder to read and maintain. To avoid this issue, it's recommended to stick to using either HTML or XML tags consistently throughout the script.

<?php
// Example of using only HTML tags in a PHP script
echo "<html><head><title>Example</title></head><body><h1>Hello World!</h1></body></html>";
?>