mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Use both destructor and shutdown
This commit is contained in:
parent
bef4696d3e
commit
e0a68b1ee0
1 changed files with 7 additions and 2 deletions
|
@ -15,7 +15,11 @@ class test
|
||||||
}
|
}
|
||||||
|
|
||||||
function destructor() {
|
function destructor() {
|
||||||
print $this->member;
|
print __METHOD__ . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
function __destruct() {
|
||||||
|
print __METHOD__ . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function add() {
|
function add() {
|
||||||
|
@ -35,4 +39,5 @@ echo "Done\n";
|
||||||
2
|
2
|
||||||
3
|
3
|
||||||
Done
|
Done
|
||||||
3
|
test::destructor
|
||||||
|
test::__destruct
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue