Constructs a ReflectionConstant

- « ReflectionConstant

- ReflectionConstant::getExtension »

- PHP Manual
- ReflectionConstant
- Constructs a ReflectionConstant

# ReflectionConstant::__construct

(PHP 8 >= 8.4.0)

ReflectionConstant::__construct — Constructs a ReflectionConstant

### Description

public ReflectionConstant::__construct(string `$name`)

Constructs a new ReflectionConstant object.

### Parameters

`name`
  The name of the constant.

### Errors/Exceptions

Throws a ReflectionException in case the given constant does not exist.

### See Also

- Constructors