title: Check PHP Errors (Syntax & Fatal Error & Warnings) during build
body: <p>While writing a phing xml code to build a php project. Is there any way to find errors in particular project file using phing xml.</p>
  
  <p>We found the code as below only throw alert for syntax error we need to filter it for all php errors like fatal errors &amp; warnings &amp; syntax errors.</p>
  
  <p>the code as below :</p>
  
  <pre><code>  &lt;target name="build"&gt;
  
      &lt;apply executable="php" failonerror="true"&gt;
          &lt;arg value="-l" /&gt;
          &lt;fileset dir="${srcDir}"&gt;
              &lt;include name="**/*.php" /&gt;
          &lt;/fileset&gt;
      &lt;/apply&gt;
  
   &lt;/target&gt;
  </code></pre>