What are the best practices for highlighting PHP code within a text?

When highlighting PHP code within a text, it is best to use a syntax highlighting tool or library to ensure that the code is displayed clearly and legibly. One popular tool for this purpose is highlight.js, which supports a wide range of programming languages including PHP. By using highlight.js, you can easily add syntax highlighting to your code snippets within a text.

<?php
echo "Hello, World!";
?>