According to this, questions with a typo or syntax error should be closed. However we still have to address the issue where the OP has made a mistake. Where is the best place to respond to him, in the comments or in an answer?
This question, syntax error line 21 php, is obviously about a syntax error. I left a comment saying where the problem is, and voted to close it as "too localized". However, a user with the close vote privilege chose to give an answer, repeating what was in my comments.
Should we answer the typo question, possibly gaining a few reps, or just leave a comment and close it?