Or, similar to the usage of `get_defined_functions `, what about using [`get_declared_classes`](http://www.php.net/manual/en/function.get-declared-classes.php), [`get_declared_interfaces`](http://www.php.net/manual/en/function.get-declared-interfaces.php), and [`get_declared_traits`](http://www.php.net/manual/en/function.get-declared-traits.php)? It might still need one of your three semi-static common case ideas since `Request` and `Response` aren't necessarily loaded by the time an error shows up.

Also, thanks for your work - it will be much more convenient to copy paste a suggested fix than retyping it or tracking down the correct usage.