The ReflectionReference class

- « ReflectionIntersectionType::getTypes

- ReflectionReference::__construct »

- PHP Manual
- Reflection
- The ReflectionReference class

# The ReflectionReference class

(PHP 7 >= 7.4.0, PHP 8)

## Introduction

The ReflectionReference class provides information about a reference.

## Class synopsis

final class ReflectionReference {
/* Methods */
private __construct()
public static fromArrayElement(array `$array`, int|string `$key`): ?ReflectionReference
public getId(): string
}

## Table of Contents

- ReflectionReference::__construct — Private constructor to disallow direct instantiation
- ReflectionReference::fromArrayElement — Create a ReflectionReference from an array element
- ReflectionReference::getId — Get unique ID of a reference