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 // Defining an extension $A = 'DOM' ; // Using ReflectionExtension() over the // specified extension $extension = new ReflectionExtension( $A ); // Calling the info() function $B = $extension ->info(); // Getting the information of the // specified extension 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 // Using ReflectionExtension() over // a extension xml $extension = new ReflectionExtension( 'xml' ); // Calling the info() function and // Getting the information of the specified extension 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