Finding PHP dependencies
Posted
by JW
on Stack Overflow
See other posts from Stack Overflow
or by JW
Published on 2010-04-25T20:28:41Z
Indexed on
2010/04/25
20:33 UTC
Read the original article
Hit count: 203
php
|dependencies
Are there any tools that can list the names of classes used by a PHP file?
For example, if I ran it on this file:
<?
class Test {
public function __construct(Obj1 $x) {
$y = new Obj2();
$str = "Obj3";
$z = new $str();
}
}
?>
it would report "Obj1" and "Obj2". If it were really smart it might report "Obj3" as well, but that's not essential.
I'm trying to package up some code, and I want some help making sure that I didn't miss any dependencies.
There's something called PHP_Depend, which can graph the number of dependencies, but can't report what they are.
© Stack Overflow or respective owner