To run a quick sanity check on a PHP script, run:

php -l filename

EXAMPLE:

Warning at line 46, character 15:  net-enabling start-tag; possibly missing required quotes around an attribute value or using XHTML syntax in HTML
Error at line 61, character 61:  text is not allowed here; try wrapping the text in a more descriptive container
Error at line 61, character 93:  end tag for element “OPTION” which is not open; try removing the end tag or check for improper nesting of elements

Error at line 64, character 18:  missing a required sub-element of “SELECT”
Error at line 69, character 30:  required attribute “TYPE” not specified
Error at line 69, character 30:  element “SCRIPT” not allowed here; check which elements this element may be contained within