Weakref::acquireAcquires a strong reference on that object Beschreibung
public bool Weakref::acquire
( void
)
Acquires a strong reference on that object, virtually turning the weak reference into a strong one. The Weakref instance maintains an internal acquired counter to track outstanding strong references. If the call to Weakref::acquire is successful, this counter will be incremented by one. Parameter-ListeDiese Funktion hat keine Parameter. Rückgabewerte
Returns Beispiele
Beispiel #1 Weakref::acquire example
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe: Unsetting o1... Unsetting o2... Destroying object!
Beispiel #2 Nested acquire/release example
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
Acquiring...
Unsetting...
Acquiring...
Acquiring...
Releasing...
Releasing...
Releasing...
Destroying object!
Siehe auch
|