ReflectionReference::fromArrayElement

(PHP 7 >= 7.4.0)

ReflectionReference::fromArrayElementCreate a ReflectionReference from an array element

Beschreibung

public static ReflectionReference::fromArrayElement ( array $array , mixed $key ) : ReflectionReference

Creates a ReflectionReference from an array element.

Parameter-Liste

array

The array which contains the potential reference.

key

The key; either an integer or a string.

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.

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top