I think what happens is that php runs until the end of the script or until it meets an error that prevents it from going any further. When it comes across an error it returns an error message and the line number at which it stopped. The glitch in the script might be before that, so track back from the line reported in the error message.
If the error message reads:
Parse error: syntax error, unexpected '<' in /Library/WebServer/Documents/test/index.php on line 63
It might mean you've forgotten to close the php tag "<?" on line 62.
If it reads:
Parse error: syntax error, unexpected $end in /Library/WebServer/Documents/test/index.php on line 120
where line 120 is the last line of the script you've probably not closed a curly brace "{" somewhere in the script.
If that doesn't help, you could try posting the error you're having trouble with.
Best wishes
David.