ReflectionExtension::getFunctions

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::getFunctions拡張モジュールの関数を取得する

説明

publicReflectionExtension::getFunctions(): array

拡張モジュールで定義されている関数を取得します。

パラメータ

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

戻り値

ReflectionFunction オブジェクトの連想配列を返します。 拡張モジュール内で定義されている関数名がキーとなります。 関数が定義されていない場合は空の配列を返します。

例1 ReflectionExtension::getFunctions() の例

<?php
$dom
= new ReflectionExtension('SimpleXML');

print_r($dom->getFunctions());
?>

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

Array ( [simplexml_load_file] => ReflectionFunction Object ( [name] => simplexml_load_file ) [simplexml_load_string] => ReflectionFunction Object ( [name] => simplexml_load_string ) [simplexml_import_dom] => ReflectionFunction Object ( [name] => simplexml_import_dom ) )

参考

To Top