Open In App

PHP | ReflectionMethod isDestructor() Function

Last Updated : 30 Dec, 2019
Comments
Improve
Suggest changes
Like Article
Like
Report
The ReflectionMethod::isDestructor() function is an inbuilt function in PHP which is used to return TRUE if the specified method is destructor, otherwise FALSE. Syntax:
bool ReflectionMethod::isDestructor( void )
Parameters: This function does not accept any parameters. Return Value: This function returns TRUE if the specified method is destructor, otherwise returns FALSE. Below programs illustrate the ReflectionMethod::isDestructor() function in PHP: Program 1:
Output:
bool(true)
Program 2:
Output:
bool(false)
bool(true)
bool(false)
Reference: https://www.php.net/manual/en/reflectionmethod.isdestructor.php

Next Article

Similar Reads