title: bash command piping (and php): How to check from command line each php file in all subdirs?
body: <p>I'm trying to loop recursively through my project dirs and subdirs and check syntax from php command line. </p>
  
  <p>I'm able to list all php files using </p>
  
  <pre><code>find ./ -name '*.php'
  </code></pre>
  
  <p>and I'm able to che check a single php php as</p>
  
  <pre><code>php -l ./full/path/to/file/filename.php
  </code></pre>
  
  <p>But I'm not ble to make them working together</p>
  
  <pre><code> find ./ -name '*.php' | php -l
  </code></pre>
  
  <p>This really doesn't do any check. I tried forcing a syntax error in a file but this tell me every time: </p>
  
  <pre><code>No syntax errors detected in -
  </code></pre>
  
  <p><strong>How to correctly pipe each file name for php syntax checking?</strong></p>
  
  <p>Feel free to adjust the title and/or the question, my english is not so good.</p>
  
  <p>EDIT 1: I googled on stackoverflow and tried these, but without success</p>
  
  <pre><code>$ find ./ -name '*.php' | xargs -0 "php -l"
  xargs: argument line too long
  </code></pre>
  
  <p>EDIT 2: another try</p>
  
  <pre><code>$ find ./ -name '*.php' -exec php -l
  find: missing argument to `-exec'
  </code></pre>