PHP uses the Get_class_methods () function to get the classification method _php tips

Source: Internet
Author: User
Tags php programming php regular expression

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.

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.