Gets a class constant's type

# ReflectionClassConstant::getType

(PHP 8 >= 8.3.0)

ReflectionClassConstant::getType — Gets a class constant's type

### Beschreibung

public function ReflectionClassConstant::getType(): ?ReflectionType

Gets the associated type of a class constant.

### Parameter-Liste

Diese Funktion besitzt keine Parameter.

### Rückgabewerte

Returns a ReflectionType object if a constant type is specified, `null` otherwise.

### Siehe auch

- ReflectionClassConstant::hasType() - Checks if class constant has a type
- ReflectionType

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open