What best practices should be followed when formatting PHP code to avoid syntax errors and improve readability?

When formatting PHP code, it is important to follow best practices to avoid syntax errors and improve readability. Some key practices include using consistent indentation, following a naming convention for variables and functions, using whitespace effectively, and properly commenting your code.

<?php

// Example of well-formatted PHP code
$variableName = "value";

function functionName($param1, $param2) {
    // Code block
    return $param1 + $param2;
}

?>