ReflectionReference::fromArrayElement
(PHP 7 >= 7.4.0, PHP 8)
ReflectionReference::fromArrayElement — Create a ReflectionReference from an array element
Beschreibung
$array
, int|string $key
): ?ReflectionReferenceCreates a ReflectionReference from an array element.
Parameter-Liste
Rückgabewerte
Returns a ReflectionReference instance if
$array[$key]
is a reference, or null
otherwise.
Fehler/Exceptions
If array
is not an Array, or key
is not an Integer or String, a TypeError is thrown.
If $array[$key]
does not exist,
a ReflectionException is thrown.