有没有办法在php类中获取所有常量。尝试了get_class_vars(get_called_class())
class Status
{
const PUBLISHED = "published";
const DRAFT = "draft";
public static function get_types()
{
return array(self::PUBLISHED, self::DRAFT);
}
}
由于