What are some common pitfalls in PHP syntax that can lead to errors?

One common pitfall in PHP syntax is forgetting to properly close a statement with a semicolon. This can lead to syntax errors and unexpected behavior in your code. To avoid this issue, always remember to end each statement with a semicolon.

// Incorrect way without a semicolon
echo "Hello, World!"
// Correct way with a semicolon
echo "Hello, World!";