What are the best practices for formatting PHP code using [PHP] tags in forums?

When formatting PHP code using [PHP] tags in forums, it is best to ensure readability and consistency for other users. One common practice is to properly indent the code to improve clarity and organization. Additionally, using proper spacing and line breaks can make the code easier to follow. Finally, commenting the code appropriately can help explain its functionality to others.

<?php

// Sample PHP code snippet
$variable = 'Hello, World!';

echo $variable;

?>