- get_declared_classes: documentation ( source)
<?php
$class_names = get_declared_classes();
foreach ($class_names as $class_name) {
$rc = new ReflectionClass($class_name);
$constructor = $rc->getConstructor();
if ($constructor != NULL) {
$params = $constructor->getParameters();
echo "new $class_name(";
foreach ($params as $param) {
$name = $param->getName();
$opt = $param->isOptional();
if ($opt) {
echo "[$name], ";
} else {
echo "$name, ";
}
}
if (empty($params)) {
echo "[none or dynamic]";
}
echo ")\n";
}
}
This script was stopped while abusing our resources