略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: ReflectionExtension::getDependencies

2024-04-27

ReflectionExtension::getDependencies

(PHP 5 >= 5.1.3, PHP 7, PHP 8)

ReflectionExtension::getDependencies获取依赖

说明

public ReflectionExtension::getDependencies(): array

获取依赖,包括必需的、冲突的、可选的。 Gets dependencies, by listing both required and conflicting dependencies.

参数

此函数没有参数。

返回值

返回一个以依赖的扩展名称为索引的数组,每一项的取值为 RequiredOptional 或者 Conflicts

范例

示例 #1 ReflectionExtension::getDependencies() example

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

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

以上例程的输出类似于:

Array
(
    [libxml] => Required
    [domxml] => Conflicts
)

参见

  • ReflectionClass::getVersion()
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/reflectionextension.getdependencies.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3