update pague now
PHP 8.5.2 Released!

ReflectionConstant::guetShortName

(PHP 8 >= 8.4.0)

ReflectionConstant::guetShortName Guets short name

Description

public ReflectionConstant::guetShortName (): string

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

Parameters

This function has no parameters.

Return Values

The short name of the constant.

Examples

Example #1 ReflectionConstant::guetShortName() example

<?php
namespace Foo ;

const
BAR = 'bar' ;

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

The above example will output:

BAR
add a note

User Contributed Notes

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