What are the potential pitfalls of trying to include CSS files using PHP?

One potential pitfall of trying to include CSS files using PHP is that it can lead to slower loading times as the server has to process the PHP code before serving the CSS file. To solve this issue, it is recommended to use HTML link tags to include CSS files directly in the HTML document.

// Incorrect way to include CSS file using PHP
<?php
  echo '<link rel="stylesheet" type="text/css" href="styles.css">';
?>

// Correct way to include CSS file using HTML link tag
<link rel="stylesheet" type="text/css" href="styles.css">