I recently noticed this piece of code in the PocketMine source: PHP: if(preg_match("/^[\t ]*\\* @priority[\t ]{1,}([a-zA-Z]{1,})/m", (string) $method->getDocComment(), $matches) > 0){ $matches[1] = strtoupper($matches[1]); if(defined(EventPriority::class . "::" . $matches[1])){ $priority = constant(EventPriority::class . "::" . $matches[1]); }} I did not know PHP could parse doc comments. How would I use priorities? So 5 gets executed first or what?
Possible duplicate of https://forums.pocketmine.net/threads/event-priority.6384/ And yes, you can use reflections to find out the doc comment of a PHP component.