ReflectionConstant::getShortName

(PHP 8 >= 8.4.0)

ReflectionConstant::getShortNameGets short name

Açıklama

public ReflectionConstant::getShortName(): string

Gets the short name of the constant, the part without the namespace.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

The short name of the constant.

Örnekler

Örnek 1 ReflectionConstant::getShortName() example

<?php
namespace Foo;

const
BAR = 'bar';

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

Yukarıdaki örneğin çıktısı:

BAR

Ayrıca Bakınız

add a note

User Contributed Notes

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