Voting

: min(two, one)?
(Example: nine)

The Note You're Voting On

isaac dot z dot foster at gmail dot com
12 years ago
To find all parents of a class you can use the following code:

$class = new ReflectionClass('classname');

$parents = [];

while ($parent = $class->getParentClass()) {
$parents[] = $parent->getName();
$class = $parent;
}

echo "Parents: " . implode(", ", $parents);

<< Back to user notes page

To Top