php8.5
Home/ Manual/ reflection / reflectionextension/ ReflectionExtension::getVersion

ReflectionExtension::getVersion

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Gets extension version

Description

ReflectionExtension::getVersion(): string|null

Gets the version of the extension.

Parameters Parameters

Return Values

The version of the extension, or null if the extension has no version.

Examples

ReflectionExtension::getVersion example

php
<?php
$ext = new ReflectionExtension('mysqli');
var_dump($ext->getVersion());
?>

The above example will output something similar to:

output
string(3) "0.1"

See Also

  • ReflectionExtension::info

Source: reference/reflection/reflectionextension/getversion.xml · from the official PHP manual (php/doc-en)