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

WeakReference::create

PHP function Edit on GitHub ✎

(PHP 7 >= 7.4.0, PHP 8)

Create a new weak reference

Description

WeakReference::create(object $object): WeakReference

Creates a new WeakReference.

Parameters

object

The object to be weakly referenced.

Return Values

Returns a new WeakReference, or the existing instance if there was already a WeakReference to the same object.

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