mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Draft for weakref documentation
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@315920 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0bec285e66
commit
798d44caec
1 changed files with 0 additions and 33 deletions
|
@ -1,33 +0,0 @@
|
|||
<?php
|
||||
class MyClass {
|
||||
public function __destruct() {
|
||||
echo "Destroying object!\n";
|
||||
}
|
||||
}
|
||||
|
||||
$o1 = new MyClass;
|
||||
|
||||
$r1 = new Weakref($o1);
|
||||
|
||||
echo "Acquiring...\n";
|
||||
$r1->acquire();
|
||||
|
||||
echo " Unsetting...\n";
|
||||
unset($o1);
|
||||
|
||||
echo " Acquiring...\n";
|
||||
$r1->acquire();
|
||||
|
||||
echo " Acquiring...\n";
|
||||
$r1->acquire();
|
||||
|
||||
echo " Releasing...\n";
|
||||
$r1->release();
|
||||
|
||||
echo " Releasing...\n";
|
||||
$r1->release();
|
||||
|
||||
echo "Releasing...\n";
|
||||
$r1->release();
|
||||
|
||||
?>
|
Loading…
Reference in a new issue