Since: 7.4

final class ReflectionReference (View source)

The ReflectionReference class provides information about a reference.

Note: Unlike the description in the documentation, the class itself is not final.

Methods

static ReflectionReference|null
fromArrayElement(array $array, int|string $key)

Returns ReflectionReference if array element is a reference, {null} otherwise

string
getId()

Returns unique identifier for the reference. The return value format is unspecified

Details

static ReflectionReference|null fromArrayElement(array $array, int|string $key)

Returns ReflectionReference if array element is a reference, {null} otherwise

Parameters

array $array

The array which contains the potential reference.

int|string $key

The key; either an integer or a string.

Return Value

ReflectionReference|null

string getId()

Returns unique identifier for the reference. The return value format is unspecified

Return Value

string

Returns an integer or string of unspecified format.