Open In App

PHP | Reflection getModifiers() Function

Last Updated : 17 Dec, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The Reflection::getModifiers() function is an inbuilt function in PHP which is used to return an array of the specified modifier names. Syntax:
int Reflection::getModifiers( void )
Parameters: This function does not accept any parameters. Return Value: This function returns a bitfield of the access modifiers for the specified class. Below programs illustrate the Reflection::getModifiers() function in PHP: Program 1:
Output:
public static
Program 2:
Output:
public
final public
private
Reference: https://secure.php.net/manual/en/reflectionclass.getmodifiers.php

Next Article

Similar Reads