roave/better-reflection
Better Reflection is an enhanced PHP reflection API for static analysis. Reflect on classes without loading them, from PHP code strings, and on closures; extract method/function AST and type declarations. Feature-rich but slower than native reflection (not for runtime).
Roave BetterReflection is an advanced reflection API for PHP that extends far beyond the built-in Reflection capabilities, especially for static analysis and code introspection. It can analyze code without executing it, making it ideal for tooling that needs reliable type and structure information.
Built for feature depth (not runtime speed), it enables rich inspection of source code, ASTs, and declarations—even when classes aren’t loaded.
How can I help you explore Laravel packages today?