title: PHP get_declared_classes() of another project
body: <p>Let's say you have two different PHP projects/applications (A and B). When <a href="https://www.php.net/manual/en/function.get-declared-classes.php" rel="nofollow noreferrer"><code>get_declared_classes()</code></a> is called in project A, it will return declared classes in project A, which is expected.</p>
  <p>I'd like to get all declared classes in project B by running [a    command of] project A.</p>
  <p>The most promising option which I've tried so far is to implement a file crawler in project A and run it on project B (recursive file iterator with a <a href="https://www.php.net/manual/en/book.tokenizer.php" rel="nofollow noreferrer">tokenizer</a> that extracts fully qualified names), but it's too slow.</p>
  <p>Is there any way I can point <code>get_declared_classes()</code> written in project A to load project B's files? Is there some other default function which can do this?</p>