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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<?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);
?>

chevron_right


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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<?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());
?>

chevron_right


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



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.