What are some common syntax errors in PHP code that can lead to unexpected behavior?

One common syntax error in PHP code is missing semicolons at the end of statements. This can lead to unexpected behavior as PHP relies on semicolons to separate statements. Another common error is mismatched quotes or parentheses, which can cause syntax errors or parse errors. Additionally, using undefined variables without proper initialization can also result in unexpected behavior. Example fix for missing semicolons:

// Incorrect code
echo "Hello, world"
echo "This is a syntax error";

// Corrected code
echo "Hello, world";
echo "This is a syntax error";
```

Example fix for mismatched quotes or parentheses:
```php
// Incorrect code
echo 'This is a mismatched quote);

// Corrected code
echo 'This is a mismatched quote';
```

Example fix for using undefined variables:
```php
// Incorrect code
echo $undefinedVariable;

// Corrected code
$undefinedVariable = "This is a defined variable";
echo $undefinedVariable;