Jani Hartikainen has posted about three simple, but hard to find, mistakes that can cause you endless frustration if you're not looking in the right places.
Here's his list:
- Semicolon after a while - a small problem with big (infinitely looping) consequences)
- empty() and magic __get method - __get will hit first, then empty
- Missing semicolon after break or continue - a classic that can make switches and evaluations difficult to debug
Comments on the post include a few others: working with variables by reference, comparisons with == versus === and strpos finding the first character in a string.