Php determines the method of the class from which the object is derived. Php: how to determine the class from which an object is derived. This document describes how php judges the class from which the object is derived. Share it with you for your reference. The specific implementation method is as follows :? 1 php method used to determine the class from which the object is derived
This example describes how php judges the class from which the object is derived. Share it with you for your reference. The specific implementation method is as follows:
?
1 2 3 4 5 6 7 |
$ Th = new Thread; // create a new object If ($ th instanceof Thread) // if the object $ th is of the Thread type, the output is Yes Echo "Yes "; Else Echo "No "; ?> |
I hope this article will help you with php programming.
Examples in this article describes how php judges which class the object is derived from. Share it with you for your reference. The specific implementation method is as follows :? 1...