What potential pitfalls should be considered when using external links for CSS and JavaScript files in PHP?

When using external links for CSS and JavaScript files in PHP, potential pitfalls to consider include slower loading times due to external dependencies, potential security risks if the external links are compromised or changed, and the possibility of the external files being unavailable or moved, causing errors on your website. To mitigate these risks, it is recommended to host the CSS and JavaScript files locally on your server.

<link rel="stylesheet" type="text/css" href="/path/to/local/style.css">
<script src="/path/to/local/script.js"></script>