What are the best practices for highlighting PHP code in a forum without executing it?

When highlighting PHP code in a forum without executing it, it's important to use a code block or code formatting feature to maintain readability and prevent the code from being interpreted as actual PHP code. This can help prevent any potential security risks or unintended consequences. By enclosing the PHP code within a code block, users can easily distinguish between code snippets and regular text.

<?php
// Example PHP code snippet
echo "Hello, World!";
?>