array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'reflectionextension.construct.php', 1 => 'ReflectionExtension::__construct', ), 'up' => array ( 0 => 'class.reflectionextension.php', 1 => 'ReflectionExtension', ), 'prev' => array ( 0 => 'reflectionextension.clone.php', 1 => 'ReflectionExtension::__clone', ), 'next' => array ( 0 => 'reflectionextension.export.php', 1 => 'ReflectionExtension::export', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/reflection/reflectionextension/construct.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
ReflectionExtension::__construct — 构造 ReflectionExtension
name
扩展名。
如果要反射的扩展不存在,则抛出 ReflectionException。
示例 #1 ReflectionExtension 示例
<?php
$ext = new ReflectionExtension('Reflection');
printf('Extension: %s (version: %s)', $ext->getName(), $ext->getVersion());
?>
以上示例的输出类似于:
Extension: Reflection (version: $Revision$)