ReflectionExtension::getFunctions

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::getFunctions獲取擴展中的函數(shù)

說明

public ReflectionExtension::getFunctions(): array

獲取擴展中定義的函數(shù)。

參數(shù)

此函數(shù)沒有參數(shù)。

返回值

返回一個ReflectionFunction對象數(shù)組,數(shù)組索引為函數(shù)名。如果擴展中沒有定義函數(shù),將返回空數(shù)組。

范例

示例 #1 ReflectionExtension::getFunctions() example

<?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
        )

)

參見