PHP » GoLang |
login |
register |
about
|
GoLang Weakref::acquire
request it (348)
GoLang replacement for PHP's Weakref::acquire
[edit | history]
Weakref::acquire(PECL weakref >= 0.1.0) Weakref::acquire — Acquires 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! |
more
Recently updated
more
Most requested
more
Last requests
|