ReflectionExtension::info()函數是PHP中的內置函數,用於返回指定擴展名的信息。
用法:
void ReflectionExtension::info( void )
參數:該函數不接受任何參數。
返回值:此函數返回指定擴展名的信息。
以下示例程序旨在說明PHP中的ReflectionExtension::info()函數:
示例1:
<?php
// Defining an extension
$A = 'DOM';
// Using ReflectionExtension() over the
// specified extension
$extension = new ReflectionExtension($A);
// Calling the info() function
$B = $extension->info();
// Getting the information of the
// specified extension
var_dump($B);
?>
輸出:
dom DOM/XML => enabled DOM/XML API Version => 20031129 libxml Version => 2.9.3 HTML Support => enabled XPath Support => enabled XPointer Support => enabled Schema Support => enabled RelaxNG Support => enabled NULL
示例2:
<?php
// Using ReflectionExtension() over
// a extension xml
$extension = new ReflectionExtension('xml');
// Calling the info() function and
// Getting the information of the specified extension
var_dump($extension->info());
?>
輸出:
xml XML Support => active XML Namespace Support => active libxml2 Version => 2.9.3 NULL
參考: https://www.php.net/manual/en/reflectionextension.info.php
相關用法
- PHP ReflectionExtension getClassNames()用法及代碼示例
- PHP ReflectionExtension __toString()用法及代碼示例
- PHP ReflectionExtension isTemporary()用法及代碼示例
- PHP ReflectionExtension export()用法及代碼示例
- PHP ReflectionExtension getDependencies()用法及代碼示例
- PHP ReflectionExtension getClasses()用法及代碼示例
- PHP ReflectionExtension getVersion()用法及代碼示例
- PHP ReflectionExtension getName()用法及代碼示例
- PHP ReflectionExtension isPersistent()用法及代碼示例
- PHP ReflectionExtension getConstants()用法及代碼示例
- PHP ReflectionExtension getFunctions()用法及代碼示例
- PHP ReflectionExtension getINIEntries()用法及代碼示例
- HTML DOM console.info()用法及代碼示例
注:本文由純淨天空篩選整理自Kanchan_Ray大神的英文原創作品 PHP | ReflectionExtension info() Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。