Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that you can run php -l filename.php to run a syntax check on a file, but is there a way of parsing the file without actually executing it (ie without running any of the in-built PHP functions) as a double-check against calling undefined functions for example?

This guy has the same question, except he wants things like print to still produce output which I'm not bothered about.

share|improve this question
up vote 0 down vote accepted

How about using an IDE with a PHP plugin? That would allow you syntax highlighting and intellisense/code completetion, along with varying degrees of parse/checking. It looks like there are at least two for Eclipse: PHPEclipse and PHP Dev Tools - and one for visual studio: vs.php (paid).

share|improve this answer
    
Netbeans for PHP is actually also very good for this (no plugins required), I was just hoping for more of a command line/independent tool – Jon Mar 1 '12 at 13:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .