What is the general use of new Reflectionclass ()?

Source: Internet
Author: User
Feel it is a chicken, because it is nothing but print out the structure of the class, and this structure if there is a source, who still use it?
so the question comes , is it really chicken?


Reply to discussion (solution)

Reflectionclass's role is to get information about the class ...

Phpinfo is not the information to the PHP environment .... Is it a chicken?


Used Reflectionclass to get the source code file path is very good

 
 GetFileName ());


Reflection (Reflection) is a mechanism used in the PHP kernel
For some reason, he was exposed to programmers.
If you don't want to use it, you don't have to. It doesn't have to be that he's chicken.

You also know that reflection can analyze the structure of a class. So for the imported number of trillion source code, you also diffuse the line without a target to see the source code? Is it not easy to understand the overall situation by using reflection? (http://bbs.csdn.net/topics/390836735)

In factory law design mode, reflection is typically used to instantiate an object
There are some possible uses, you can see the http://blog.csdn.net/salc3k/article/details/7287387

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.