PHP | ReflectionExtension info() Function
The ReflectionExtension::info() function is an inbuilt function in PHP which is used to return the information of the specified extension.
Syntax:
void ReflectionExtension::info( void )
Parameters: This function does not accept any parameter.
Return Value: This function returns the information of the specified extension.
Below programs illustrate the ReflectionExtension::info() function in PHP:
Program 1:
<?php
$A = 'DOM' ;
$extension = new ReflectionExtension( $A );
$B = $extension ->info();
var_dump( $B );
?>
|
Output:
dom
DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.3
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled
NULL
Program 2:
<?php
$extension = new ReflectionExtension( 'xml' );
var_dump( $extension ->info());
?>
|
Output:
xml
XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.3
NULL
Reference: https://www.php.net/manual/en/reflectionextension.info.php
Last Updated :
11 Dec, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...