roave/better-reflection
Enhanced PHP reflection for static analysis: reflect classes without loading them, from PHP code strings or closures, extract AST from functions/methods, and read type declarations and docblocks. Feature-rich but slower than native reflection.
Adopt if:
Avoid if:
ReflectionClass for speed).ReflectionFunction for runtime).ReflectionExtension or ReflectionZendExtension (unsupported).Alternatives:
For Executives: *"BetterReflection lets us build smarter, faster static analysis tools—like a supercharged X-ray for PHP code. Instead of guessing what classes/methods do, we can inspect them before they run, enabling:
For Engineers: *"This is the Swiss Army knife for PHP static analysis. Key wins:
How can I help you explore Laravel packages today?