(PHP 7 >= 7.4.0, PHP 8)
ReflectionReference::fromArrayElement — Create a ReflectionReference from an array element
$array, int|string $key): ?ReflectionReferenceCreates a ReflectionReference from an array element.
arrayThe tableau which contains the potential reference.
keyThe key; either an entier or a chaîne de caractères.
Returns a ReflectionReference instance if
$array[$key] is a reference, or null otherwise.
If array is not an tableau, or key
is not an entier or chaîne de caractères, a TypeError is thrown.
If $array[$key] does not exist,
a ReflectionException is thrown.