Example

<phpmd file="path/to/source.php"/>

Checking syntax of one particular source file. Sending Text-Report to STDOUT.

<phpmd file="path/to/source">
   <formatter type="html" outfile="reports/pmd.html"/>
 </phpmd>

Checking syntax of source files in the given path.

<phpmd>
   <fileset dir="${builddir}">
     <include name="apps/**/*.php" />
     <include name="lib/de/**/*.php" />
   </fileset>
   <formatter type="xml" outfile="reports/pmd.xml"/>
 </phpmd>

Checking syntax of source files in the fileset pathes.