php8.5
Home/ Manual/ predefined / weakreference/ WeakReference::get

WeakReference::get

PHP function Edit on GitHub ✎

(PHP 7 >= 7.4.0, PHP 8)

Get a weakly referenced Object

Description

WeakReference::get(): object|null

Gets a weakly referenced object. If the object has already been destroyed, null is returned.

Parameters Parameters

Return Values

Returns the referenced Object, or null if the object has been destroyed.

Source: language/predefined/weakreference/get.xml · from the official PHP manual (php/doc-en)