PHP | ReflectionExtension export() Function Last Updated : 13 Dec, 2019 Comments Improve Suggest changes Like Article Like Report The ReflectionExtension::export() function is an inbuilt function in PHP which is used to return the export as a string if the return parameter is set to TRUE, otherwise NULL is returned. Syntax: string ReflectionExtension::export( string $name, string $return ) Parameters: This function accepts two parameters as mentioned above and described below: $name: This parameter holds the export of reflection. $return: This parameter holds the Boolean value. If its value is set to True then it will export the reflected extension. If its value is set to False then it will not export the reflected extension. Return Value: This function returns the export as a string if the return parameter is set to TRUE, otherwise NULL is returned. Below programs illustrate the ReflectionExtension::export() function in PHP: Program_1: php <?php // Defining an extension $A = 'DOM'; // Using ReflectionExtension() over the // specified extension $extension = new ReflectionExtension($A); // Calling the export() function $B = $extension->export($A, $return = FALSE); // Getting the export as a string var_dump($B); ?> Output: Extension [ <persistent> extension #18 dom version 20031129 ] { - Dependencies { Dependency [ libxml (Required) ] Dependency [ domxml (Conflicts) ] } - Constants [45] { Constant [ integer XML_ELEMENT_NODE ] { 1 } . . . Constant [ integer DOM_VALIDATION_ERR ] { 16 } } . . . . . . - Parameters [3] { Parameter #0 [ <required> $expr ] Parameter #1 [ <optional> DOMNode or NULL $context ] Parameter #2 [ <optional> $registerNodeNS ] } } Method [ <internal:dom> public method registerPhpFunctions ] { - Parameters [0] { } } } } } } NULL Program_2: php <?php // Using ReflectionExtension() over // a extension xml $extension = new ReflectionExtension('xml'); // Calling the export() function and // Getting the export as a string var_dump($extension->export('xml', $return = TRUE)); ?> Output: string(6209) "Extension [ <persistent> extension #15 xml version 7.0.33-0ubuntu0.16.04.7 ] { - Dependencies { Dependency [ libxml (Required) ] } . . . Function [ <internal:xml> function utf8_decode ] { - Parameters [1] { Parameter #0 [ <required> $data ] } } } } " Reference: https://www.php.net/manual/en/reflectionextension.export.php Comment More infoAdvertise with us Next Article PHP | ReflectionExtension export() Function K Kanchan_Ray Follow Improve Article Tags : Web Technologies PHP PHP-function PHP- Reflection Similar Reads PHP | ReflectionMethod export() Function The ReflectionMethod::export() function is an inbuilt function in PHP which is used to return the export as a string if the return parameter has been set to TRUE, otherwise NULL is returned. Syntax: string ReflectionMethod::export ( $class, $name, $return ) Parameters: This function accepts three pa 3 min read PHP ReflectionFunction export() Function The ReflectionFunction::export() function is an inbuilt function in PHP which is used to return the export as a string if the return parameter is set to TRUE, otherwise NULL is returned. Syntax: string ReflectionFunction::export( string $name, string $return ) Parameters: This function accepts two p 2 min read PHP | ReflectionClass export() Function The ReflectionClass::export() function is an inbuilt function in PHP which is used to return a string if the parameter has been set to TRUE, otherwise return NULL. Syntax: string ReflectionClass::export( mixed $argument, bool $return = FALSE) Parameters: This function accepts two parameters as menti 6 min read 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 th 1 min read PHP | ReflectionExtension getFunctions() Function The ReflectionExtension::getFunctions() function is an inbuilt function in PHP which is used to return extension functions from the specified extension. Syntax: array ReflectionExtension::getFunctions( void ) Parameters: This function does not accept any parameter. Return Value: This function return 2 min read PHP | ReflectionExtension getName() Function 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 spec 1 min read PHP | ReflectionExtension __toString() Function The ReflectionExtension::__toString() function is an inbuilt function in PHP which is used to return the string representation of the specified extension object. Syntax: ReflectionExtension::__toString() Parameters: This function does not accept any parameter. Return Value: This function returns the 2 min read PHP | ReflectionExtension getClasses() Function The ReflectionExtension::getClasses() function is an inbuilt function in PHP which is used to return a list of classes from specified extension. If no classes are specified, an empty array is returned. Syntax: array ReflectionExtension::getClasses( void ) Parameters: This function does not accept an 2 min read PHP | ReflectionExtension getVersion() Function The ReflectionExtension::getVersion() function is an inbuilt function in PHP which is used to return the version of the specified extension. Syntax: string ReflectionExtension::getVersion( void ) Parameters: This function does not accept any parameter. Return Value: This function returns the version 1 min read PHP | ReflectionExtension isTemporary() Function The ReflectionExtension::isTemporary() function is an inbuilt function in PHP which is used to return true if the specified extension is temporary, otherwise returns false. Syntax: void ReflectionExtension::isTemporary( void ) Parameters: This function does not accept any parameter. Return Value: Th 1 min read Like