ReflectionConstant::getExtensionName

(PHP 8 >= 8.5.0)

ReflectionConstant::getExtensionNameGets name of the defining extension

Descripción

public ReflectionConstant::getExtensionName(): string|false

Gets the name of the extension which defined the constant.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

The name of the extension which defined the constant, or false for user-defined constants.

Ejemplos

Ejemplo #1 Basic usage of ReflectionConstant::getExtensionName()

<?php
var_dump
((new ReflectionConstant('SQLITE3_TEXT'))->getExtensionName());
?>

El resultado del ejemplo sería:

string(7) "sqlite3"

Ver también