In the context of PHP forum software, what are some considerations for optimizing code display and readability for users sharing code snippets?

To optimize code display and readability for users sharing code snippets in PHP forum software, consider using syntax highlighting to make the code more visually appealing and easier to read. Additionally, ensure that code snippets are properly formatted with appropriate indentation and line breaks.

<?php
// Example code snippet with syntax highlighting
echo "<pre><code class='php'>";
echo htmlspecialchars($codeSnippet);
echo "</code></pre>";
?>