Weakref::acquireAcquires a strong reference on that object Description
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. ParametersThis function has no parameters. Return Values
Returns Examples
Example #1 Weakref::acquire example
<?php The above example will output: Unsetting o1... Unsetting o2... Destroying object!
Example #2 Nested acquire/release example
<?php The above example will output: Acquiring... Unsetting... Acquiring... Acquiring... Releasing... Releasing... Releasing... Destroying object! See Also
|