In Java you can send MyClass.class as a param and use get the entire class information.
What’s the equivalent in php?
I already knows about get_object_*, but I am looking for something more advanced.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP does not have class literals, so you are probably looking for the Reflection API then
Example (demo):
There is also some functions that can give you information about a class with
class_parents— Return the parent classes of the given classclass_implements— Return the interfaces which are implemented by the given class