How can I check a php file for undefined functions?
<p>Calling <code>php -l</code> checks the syntax of a php file.</p>

<p>Is there a way to check for undefined functions? <strong>I don't need it to work with functions defined at runtime <em>nor</em> with dynamic calls</strong>.</p>

<p><strong>Calling the file obviously won't work</strong>: I need to check the whole file, not only the branch that gets executed. See the follwing example.</p>

<p>myfile.php:</p>

<pre><code>function imhere () {}
</code></pre>

<p>main.php:</p>

<pre><code>require_once 'myfile.php';

if (true) {
    imhere();
}
else {
    imnhothere(); // I need to get a warning about this
}
</code></pre>
