Running PHP's "built-in" lint checker (php -l) is a quick way to remove syntax errors which should never creep into your code.
However, you'll no doubt soon tire of typing "php -l" before every Git commit message, so why not let Git do the checking for you with a "pre-commit hook".
Travis Swicegood has a great article on how to set this up with Git :
http://phpadvent.org/2008/dont-commit-that-error-by-travis-swicegood
I found you could pretty much copy his pre-commit PHP script and paste it into your .git/hooks directory with a couple caveats :