PHP: get_class_methods - Manual in Deutsh
PHP: get_class_methods - Manual in French
PHP: get_class_methods - Manual in Polish

You Are At PHP: get_class_methods - Manual Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

get_class_methods

(PHP 4, PHP 5)

get_class_methods -- Gets the class methods' names

Description

array get_class_methods ( mixed class_name )

Gets the class methods names.

Parameters

class_name

The class name of an object instance

Return Values

Returns an array of method names defined for the class specified by class_name. In case of an error, it returns NULL.

ChangeLog

VersionDescription
5.0.0 As of PHP 5, this function returns the name of the methods as they were declared (case-sensitive). In PHP 4 they were lowercased.
4.0.6 The ability of specifying the object itself has been added.

Examples

Example 1. get_class_methods() example

<?php

class myclass {
    
// constructor
    
function myclass()
    {
        return(
true);
    }

    
// method 1
    
function myfunc1()
    {
        return(
true);
    }

    
// method 2
    
function myfunc2()
    {
        return(
true);
    }
}

$class_methods = get_class_methods('myclass');
// or
$class_methods = get_class_methods(new myclass());

foreach (
$class_methods as $method_name) {
    echo
"$method_name\n";
}

?>

The above example will output:

myclass
myfunc1
myfunc2

See Also

get_class()
get_class_vars()
get_object_vars()

najlepsza strona darmo gra profesjonalne wyniki
fizjoterapia
fotograf lublin
Najsmaczniejsze obiady łodź
całodobowa pomoc drogowa Rzeszów

Another Useful functions:


zend-api.zend-u-get-constant | zend-api.zend-hash-get-current-key | zend-api.zend-hash-get-current-key-type | zend-api.zend-hash-get-current-key-type-ex | zend-api.zend-hash-get-current-key-ex | zend-api.zend-hash-get-current-data | zend-api.zend-hash-get-current-data-ex | zend-api.zend-get-constant | zend-api.zend-get-configuration-directive | zend-api.zend-get-compiled-variable-value | zend-api.zend-get-compiled-variable-name | zend-api.zend-get-compiled-script-encoding | zend-api.zend-get-compiled-lineno | zend-api.zend-get-compiled-filename | zend-api.zend-get-class-entry | function.zlib-get-coding-type | function.xml-get-current-line-number | function.xml-get-current-column-number | function.xml-get-current-byte-index | function.tidy-get-config | function.stream-get-contents | function.session-get-cookie-params | function.ob-get-contents | function.ob-get-clean | function.newt-radio-get-current | function.newt-listbox-get-current | function.newt-form-get-current | function.newt-checkbox-tree-get-current | function.mysqli-get-client-version | function.mysqli-get-client-info | function.mysqli-get-charset | function.mysql-get-client-info | function.mcrypt-get-cipher-name | function.maxdb-get-client-version | function.maxdb-get-client-info | function.ifx-get-char | function.get-current-user | function.get-class | function.get-class-vars | function.get-class-methods | function.get-cfg-var | function.file-get-contents | function.domnode-get-content |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.