ReflectionExtension::__construct
PHP function
Edit on GitHub ✎
(PHP 5, PHP 7, PHP 8)
Constructs a ReflectionExtension
Description
ReflectionExtension::__construct(string $name)
Construct a ReflectionExtension object.
Parameters
nameName of the extension.
Errors/Exceptions
Throws ReflectionException if the extension to reflect does not exist.
Examples
ReflectionExtension example
php
<?php
$ext = new ReflectionExtension('Reflection');
printf('Extension: %s (version: %s)', $ext->getName(), $ext->getVersion());
?>The above example will output something similar to:
output
Extension: Reflection (version: 8.3.17)See Also
ReflectionExtension::info- Constructors