PHP get_class_methods function Usage _php Tutorial

Source: Internet
Author: User

PHP get_class_methods Function usage


The purpose of the Get_class_methods function is to return an array of the method names of the class. This article will briefly share the relevant usage of the function.

Function prototype array get_class_methods (mixed $class _name)

Returns an array of the method names that are defined in the class specified by Class_name. If an error occurs, NULL is returned.

Note: Starting with PHP 4.0.6, you can specify the object itself instead of class_name. The specific examples used by Get_class_methods () are as follows:

 
  ';}

The example above will output:

MyClass
Myfunc1
Myfunc2

Attention:

Since PHP 5, this function is returned (case-sensitive) according to the name defined by the method. In PHP 4, the lowercase is always returned.

Articles you may be interested in

    • PHP uses the Session_set_save_handler () function to save the session to the MySQL database
    • function and usage of PHP get_headers functions
    • PHP Simulation get_headers function
    • Comparison of performance efficiency of file_get_contents to curl in PHP
    • PhpMyAdmin cannot start session without errors error resolution
    • PHP get_headers to determine if the URL is valid
    • To get a function of a class_id collection
    • PHP mktime Function Analysis

http://www.bkjia.com/PHPjc/906826.html www.bkjia.com true http://www.bkjia.com/PHPjc/906826.html techarticle PHP get_class_methods function Usage The Get_class_methods function is to return an array of the method names of the class. This article will briefly share the relevant usage of the function. Function ...

  • 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.