Referring to Is there a static code analyzer [like Lint] for PHP files? -- I am looking at how to assess the content of PHP files before they are committed by developers.
Could you use a third party compiler that has more compile time options, like phc ( http://www.phpcompiler.org/doc/latest/runningphc.html#compiling-web-applications) ? (or possibly hiphop?)
Then I thought: you need Perl::Critic for php.
Critiquing PHP-code / PerlCritic for PHP?
(also google : perl critic for php )
I wish I could be more concretely helpful, but sometimes it's just an idea that gets you to the solution. That is what I have to offer :)
David