PHP 8.5.0 Alpha 4 available for testing

ReflectionConstant::getExtensionName

(PHP 8 >= 8.5.0)

ReflectionConstant::getExtensionName定数を定義した拡張モジュールの名前を取得する

説明

public ReflectionConstant::getExtensionName(): string|false

この定数を定義した拡張モジュールの名前を取得します。

パラメータ

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

戻り値

この定数を定義した拡張モジュールの名前を返します。ユーザーが定義した定数の場合は false を返します。

例1 ReflectionConstant::getExtensionName() の基本的な使い方

<?php
var_dump
((new ReflectionConstant('SQLITE3_TEXT'))->getExtensionName());
?>

上の例の出力は以下となります。

string(7) "sqlite3"

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top