(PHP 5, PHP 7, PHP 8)
The ReflectionMethod class reports information about a method.
Method name
Class name
ReflectionMethod::IS_STATIC intIndicates that the method is static. Prior to PHP 7.4.0, the value was 1.
ReflectionMethod::IS_PUBLIC intIndicates that the method is public. Prior to PHP 7.4.0, the value was 256.
ReflectionMethod::IS_PROTECTED intIndicates that the method is protected. Prior to PHP 7.4.0, the value was 512.
ReflectionMethod::IS_PRIVATE intIndicates that the method is private. Prior to PHP 7.4.0, the value was 1024.
ReflectionMethod::IS_ABSTRACT intIndicates that the method is abstract. Prior to PHP 7.4.0, the value was 2.
ReflectionMethod::IS_FINAL intIndicates 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.4.0 | The class constants are now typed. |
| 8.0.0 | ReflectionMethod::export() was removed. |