ReflectionConstant::getName

(PHP 8 >= 8.4.0)

ReflectionConstant::getNameGets name

Descrizione

public ReflectionConstant::getName(): string

Gets the name of the constant.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

The constants name, which is composed of its namespace and name.

Esempi

Example #1 ReflectionConstant::getName() example

<?php
namespace Foo;

const
BAR = 'bar';

echo (new
\ReflectionConstant('Foo\BAR'))->getName();
?>

Il precedente esempio visualizzerà:

Foo\BAR

Vedere anche:

add a note

User Contributed Notes

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