Look at the link to use xdebug with vim that someone sent for a full debugger, but as an additional tip, you can do this from vim to run syntax checking on the current PHP script:
:!php -l %
I assigned this to my F5 key by putting it in my .vimrc file (in your home directory (~)):
nmap <F5> :! php5 -l %<CR>
source share