Arquivos
hhvm/hphp/test/vm/destruct.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08: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();