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

You Are At PHP: method_exists - 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

method_exists

(PHP 4, PHP 5)

method_exists -- Checks if the class method exists

Description

bool method_exists ( object object, string method_name )

Checks if the class method exists in the given object.

Parameters

object

An object instance

method_name

The method name

Return Values

Returns TRUE if the method given by method_name has been defined for the given object, FALSE otherwise.

Examples

Example 1. method_exists() example

<?php
$directory
= new Directory('.');
var_dump(method_exists($directory,'read'));
?>

The above example will output:

bool(true)

See Also

function_exists()
is_callable()

Najlepsza ochrona mienia na rynku
tłumaczenia
opakowania z nadrukiem
Najlepsza organizacja eventów Gorąco Polecamy!
Strony internetowe

Another Useful functions:


zend-macro.zend-method | zend-api.zend-parse-method-parameters | zend-api.zend-parse-method-parameters-ex | zend-api.zend-check-magic-method-implementation | zend-api.zend-call-method | zend-api.zend-call-method-with-2-params | zend-api.zend-call-method-with-1-params | zend-api.zend-call-method-with-0-params | zend-api.add-method | migration52.methods | function.zip-entry-compressionmethod | function.xmlrpc-set-type | function.xmlrpc-server-register-method | function.xmlrpc-server-register-method | function.xmlrpc-server-register-introspection-callback | function.xmlrpc-server-create | function.xmlrpc-server-call-method | function.xmlrpc-server-call-method | function.xmlrpc-server-add-introspection-data | function.xmlrpc-server-add-introspection-data | function.xmlrpc-parse-method-descriptions | function.xmlrpc-parse-method-descriptions | function.xmlrpc-is-fault | function.w32api-set-call-method | function.ssh2-methods-negotiated | function.runkit-method-rename | function.runkit-method-remove | function.runkit-method-redefine | function.runkit-method-copy | function.runkit-method-add | function.rar-getmethod | function.method-exists | function.httprequest-setmethod | function.httprequest-getmethod | function.httpmessage-setrequestmethod | function.httpmessage-getrequestmethod | function.http-request-method-unregister | function.http-request-method-register | function.http-request-method-name | function.http-request-method-exists | function.get-class-methods | function.classkit-method-rename | function.classkit-method-remove | function.classkit-method-redefine | function.classkit-method-copy | function.classkit-method-add | function.call-user-method | function.call-user-method-array | function.aggregate-methods | function.aggregate-methods-by-regexp | function.aggregate-methods-by-list | features.file-upload.put-method |


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.