Hunting down PHP parse errors
php
Solution
First of all, I'd go using an editor that highlight PHP errors on the fly, when you type your code, like, for instance, Eclipse PDT (which is quite powerful, actively maintained, and free, and OSS) -- it will help detect some errors almost immediately, without having to execute the code.
If you are using it along with it's Subversion plug-in (to integrate SVN access in Eclipse), it can also display what it calls "quick diff" : the margin of modified lines which have not been committed to SVN is highlighted -- it help detecting what you changed since the last commit.
Note, though, that, as it's based on Eclipse, requires a quite powerful computer (I'd say a dual-core with 2GB RAM is required, 1 GB generally being not enough if you also want to use some other software at the same time ^^ )
Then, when you have being programming in PHP for quite some time, you'll probably be able to understand those messages faster / better, and will know where to look ;-)
Problem
When writing PHP code, you can cause some really hard to track down parsing errors if you don't remember what parts you were editing previously. I'd be interested to hear about any insightful methods to hunt down these errors you may have discovered. Example: unexpected ';', expecting T_FUNCTION in someclass.php on line 877 This vague error points out that you have unexpected ; in a class containing 877 lines of PHP code, and the error definitely is not on the last line. Is the error message misleading? Where and how do you start looking, besides starting from the top and just trying to find the offending place scanning every row of code.