Dutch PHP Conference 2025 - Call For Papers

ReflectionExtension::__construct

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::__constructConstructs a ReflectionExtension

Опис

public ReflectionExtension::__construct(string $name)

Construct a ReflectionExtension object.

Параметри

name

Name of the extension.

Помилки/виключення

Throws ReflectionException if the extension to reflect does not exist.

Приклади

Приклад #1 ReflectionExtension example

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