The type operator instanceof does not seem to be mentioned in some php books. in the case of php, I just mentioned that I did not elaborate on it. I just excerpted it from the manual for remarks. The instanceof operator is introduced in PHP5. Is_a () was used before, but is_a () is outdated. it is best... "/> <scripttype =" text/javascript "s-type operator instanceof does not seem to be mentioned in some php books. in php, I just mentioned that I did not elaborate on it. I excerpted from the manual, for remarks. The instanceof operator is introduced in PHP 5. Is_a () was used before, but is_a () is outdated. it is best to use instanceof. 1. used to determine whether a variable belongs to an instance of a class; 2. used to determine whether a variable is an instance inherited from a subclass of a parent class; 3. it is used to determine whether a variable is an instance of an object that implements an interface. Before PHP 5.1.0, if the class name to be checked does not exist, instanceof will call _ autoload (). In addition, a fatal error occurs if the class is not loaded. You can avoid this problem by using dynamic class reference or using a string variable containing the class name: example #6 avoid class name searches and fatal errors caused by instanceof in PHP 5.0
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