PHP | ReflectionClass isInternal() Function
Last Updated :
17 Dec, 2019
The ReflectionClass::isInternal() function is an inbuilt function in PHP which is used to check if class is defined internally by an extension, or the core.
Syntax:
bool ReflectionClass::isInternal( void )
Parameters: This function does not accept any parameters.
Return Value: This function returns TRUE if the class is defined internally by an extension, otherwise FALSE.
Below programs illustrate the ReflectionClass::isInternal() function in PHP:
Program 1:
<?php
class Departments {
public function CSE() {}
}
$class = new ReflectionClass( 'Departments' );
$instance = $class ->isInternal();
var_dump( $instance );
?>
|
Program 2:
<?php
$InternalClass = new ReflectionClass( 'ReflectionClass' );
var_dump( $InternalClass ->isInternal());
?>
|
Reference: https://www.php.net/manual/en/reflectionclass.isinternal.php
Share your thoughts in the comments
Please Login to comment...