HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

getShortName

Description

The getShortName of ReflectionConstant for PHP gets the short name.

Syntax

public ReflectionConstant::getShortName(): string

Return

Returns the short name of the constant.

Examples

1 · void

<?

namespace Mynamespace
{
    const MYCONSTANT = 'value';

    $reflectionconstant = new \ReflectionConstant('Mynamespace\MYCONSTANT');

    $return = $reflectionconstant->getShortName();

    echo $return;
}
MYCONSTANT