ReflectionExtension::getVersion

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::getVersion拡張モジュールのバージョンを取得する

説明

public ReflectionExtension::getVersion(): ?string

拡張モジュールのバージョンを取得します。

パラメータ

この関数にはパラメータはありません。

戻り値

拡張モジュールのバージョンを返します。 バージョン情報がない場合は、null を返します。

例1 ReflectionExtension::getVersion() の例

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

上の例の出力は、 たとえば以下のようになります。

string(3) "0.1"

参考

関連キーワード:  拡張, モジュール, バージョン, 取得, ReflectionExtension, getVersion, info, string, パラメータ, 情報