getName
Description
The getName of ReflectionConstant for PHP gets the name.
Syntax
public ReflectionConstant::getName(): string
Return
Returns the constants name, which is composed of its namespace and name.
Examples
1 · void
<?
namespace Mynamespace
{
const MYCONSTANT = 'value';
$reflectionconstant = new \ReflectionConstant('Mynamespace\MYCONSTANT');
$return = $reflectionconstant->getName();
echo $return;
}
Mynamespace\MYCONSTANT