What are some common syntax errors to watch out for when incrementing a variable in PHP?

One common syntax error to watch out for when incrementing a variable in PHP is using the incorrect operator. Instead of using the "+" operator to increment a variable, you should use the "++" operator. This operator is specifically designed for incrementing variables in PHP.

// Incorrect way to increment a variable
$incorrectVar = 0;
$incorrectVar = $incorrectVar + 1;

// Correct way to increment a variable
$correctVar = 0;
$correctVar++;