Manual:CheckSyntax.php

This ms>Special:MyLanguage/Manual:Maintenance scripts|command-line maintenance script checks source files for syntax errors and common coding mistakes, such as byte order marks, pointless PHP closing tags ( ) at the end of file and whitespace before the opening tag ( ).

Usage
If called without arguments,   scans through main code directories (/includes/, /config/, /languages/</tt></>, <tvar|4>/maintenance/</tt></> and <tvar|5>/skins/</tt></>) and, if it exists, checks the configuration file <tvar|7></>. For example:

Command-line options:
 * --with-extensions</tt>: also scan the <tvar|ext>/extensions/</tt></> directory.
 * --path </tt>: check the given file or directory.
 * --list-file </tt>: check only files or directories listed in the given text file.
 * --modified</tt>: check only files modified in the current working copy (requires that the script is run from a Git clone and that the Git command-line client is present. Use this option to quickly check your changes before committing them to your repository.