In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Xiaobian to share with you the PHP class and object-related system functions and operators of the example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!
The details are as follows:
System function
Class_exists () determines whether a class exists interface_exists () determines whether the interface exists get_class () / _ _ CLASS__ gets the class name of an object get_parent_class () gets the class name of the parent class to which the object belongs, gets all the methods of a class, and returns the index array get_class_vars () to get all the properties of a class The subscript is the attribute name get_declared_classes () gets all declared classes (including system classes) is_object () determines whether the object get_object_vars () gets all the attributes of the object, returns the array, and the subscript is the attribute name property_exists () to determine whether the attribute _ _ METHOD__ gets the method name _ _ FUNCTION__ to get the function name
Operator
New instantiates an object instanceOf to determine whether an object is an instance of a class (including inheritance) class bee {} $o = new bee (); if ($o instanceOf bee) {echo 'true';} is all the contents of the article "sample Analysis of PHP classes and object-related system functions and operators". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.