array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'class.reflectionmethod.php', 1 => 'ReflectionMethod', ), 'up' => array ( 0 => 'book.reflection.php', 1 => 'Reflection', ), 'prev' => array ( 0 => 'reflectionfunctionabstract.tostring.php', 1 => 'ReflectionFunctionAbstract::__toString', ), 'next' => array ( 0 => 'reflectionmethod.construct.php', 1 => 'ReflectionMethod::__construct', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/reflection/reflectionmethod.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.reflectionmethod.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
The ReflectionMethod class reports information about a method.
Method name
Class name
ReflectionMethod::IS_STATIC
Indicates that the method is static.
Prior to PHP 7.4.0, the value was 1
.
ReflectionMethod::IS_PUBLIC
Indicates that the method is public.
Prior to PHP 7.4.0, the value was 256
.
ReflectionMethod::IS_PROTECTED
Indicates that the method is protected.
Prior to PHP 7.4.0, the value was 512
.
ReflectionMethod::IS_PRIVATE
Indicates that the method is private.
Prior to PHP 7.4.0, the value was 1024
.
ReflectionMethod::IS_ABSTRACT
Indicates that the method is abstract.
Prior to PHP 7.4.0, the value was 2
.
ReflectionMethod::IS_FINAL
Indicates that the method is final.
Prior to PHP 7.4.0, the value was 4
.
Note:
The values of these constants may change between PHP versions. It is recommended to always use the constants and not rely on the values directly.
Version | Description |
---|---|
8.0.0 | ReflectionMethod::export() was removed. |