See (domain not renewed as of 2010 Nov. 4 - phpslacker.com/2009/02/05/vim-tips-for-php-programmers/ )
Once it's set up right, you can use :make % to check your PHP syntax before loading the code in a browser.
:make %
See also: http://2bits.com/articles/using-vim-and-xdebug-dbgp-for-debugging-drupal-or-any-php-application.html