Arquivos
hhvm/hphp/test/quick/destruct.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07:00

31 linhas
348 B
PHP

<?php
class C {
public function bluh() {
global $x;
$x = null;
}
public function __destruct() {
print "In C::__destruct()\n";
}
}
function foo() {
$c = new C;
}
function main() {
print "Test begin\n";
foo();
// Tricky case: $this is the last reference
$x = new C;
$x->bluh();
print "Test end\n";
}
main();