Open In App

PHP | ReflectionProperty isPublic() Function

Last Updated : 30 Dec, 2019
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report
The ReflectionProperty::isPublic() function is an inbuilt function in PHP which is used to return TRUE if the specified property is public, FALSE otherwise. Syntax:
bool ReflectionProperty::isPublic ( void )
Parameters: This function does not accept any parameter. Return Value: This function returns TRUE if the specified property is public, FALSE otherwise. Below programs illustrate the ReflectionProperty::isPublic() function in PHP: Program 1:
Output:
bool(false)
bool(true)
Program 2:
Output:
bool(false)
bool(true)
bool(false)
Reference: https://www.php.net/manual/en/reflectionproperty.isprotected.php

Similar Reads