CakeFest 2024: The Official CakePHP Conference

ReflectionExtension::__construct

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::__construct构造 ReflectionExtension

说明

public ReflectionExtension::__construct(string $name)

构造 ReflectionExtension object

参数

name

扩展名。

错误/异常

如果要反射的扩展不存在,则抛出 ReflectionException

示例

示例 #1 ReflectionExtension 示例

<?php
$ext
= new ReflectionExtension('Reflection');

printf('Extension: %s (version: %s)', $ext->getName(), $ext->getVersion());
?>

以上示例的输出类似于:

Extension: Reflection (version: $Revision$)

参见

add a note

User Contributed Notes

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