Tuesday, November 19, 2024
Google search engine
HomeLanguagesPHP | ReflectionExtension info() Function

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
  
// 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

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!

RELATED ARTICLES

Most Popular

Recent Comments