Open In App

PHP | ReflectionProperty getDocComment() Function

Last Updated : 30 Dec, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The ReflectionProperty::getDocComment() function is an inbuilt function in PHP which is used to return the doc comment of the specified property. Syntax:
string ReflectionProperty::getDocComment ( void )
Parameters: This function does not accept any parameters. Return Value: This function returns the doc comment of the specified property. Below programs illustrate the ReflectionProperty::getDocComment() function in PHP: Program 1:
Output:
string(63) "/**
     * @Below is the Size of GeeksforGeeks String
     */"
string(53) "/**
     * @Below is the Size of GFG String
     */"
Program 2:
Output:
string(52) "/**
     * @Below is the Size of HR String
     */"
string(56) "/**
     * @Below is the Size of Coding String
     */"
string(59) "/**
     * @Below is the Size of Marketing String
     */"
Reference: https://www.php.net/manual/en/reflectionproperty.getdoccomment.php

Similar Reads