This example describes how PHP uses the Get_class_methods () function to get a taxonomy. Share to everyone for your reference, specific as follows:
<?php
*
* Created on 2016-7-20
/class Window //First define a class
{
var $state; Window state
function Close_window () //Close window method
{
$this->state= "closed"; The window's status is off
}
function Open_window () //Open window method
{
$this->state= "open"; The window status is open
}
$temp =get_class_methods ("window");
The methods in Echo Class window have the following: ";
echo "<p>";
For ($i =0 $i <count ($temp); $i + +)
{
echo $temp [$i]. ",";
}
? >
The results of the operation are as follows:
There are several methods in the class window:
Close_window,open_window,
For more information about PHP interested readers can view the site topics: "PHP object-oriented Programming Introductory Course", "PHP Mathematical Arithmetic Skills summary", "PHP Array" Operation Techniques Encyclopedia, "PHP string (String) Usage Summary", " PHP Data structure and algorithm tutorial, "PHP Programming Algorithm Summary", "PHP Regular Expression Usage Summary", and "PHP Common database Operation Skills Summary"
I hope this article will help you with the PHP program design.