PHP | ReflectionExtension getName() Function
Last Updated :
11 Dec, 2019
The ReflectionExtension::getName() function is an inbuilt function in PHP which is used to return the name of the specified extension.
Syntax:
string ReflectionExtension::getName( void )
Parameters: This function does not accept any parameter.
Return Value: This function returns the name of the specified extension.
Below programs illustrate the ReflectionExtension::getName() function in PHP:
Program_1:
<?php
$A = 'DOM' ;
$extension = new ReflectionExtension( $A );
$B = $extension ->getName();
var_dump( $B );
?>
|
Program_2:
<?php
$extension = new ReflectionExtension( 'xml' );
var_dump( $extension ->getName());
?>
|
Reference: https://www.php.net/manual/en/reflectionextension.getname.php
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...