Arquivos
hhvm/hphp/test/vm/resurrect.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

27 linhas
432 B
PHP

<?php
print "Test begin\n";
$x = null;
class C {
public $p = "C::\$p";
function __destruct() {
global $x;
print "In C::__destruct()\n";
$this->p = "changed";
$x = $this;
}
}
$c = new C();
var_dump($c);
$c = null;
# XXX The translator fails to notice that $x has changed, so break the basic
# block here to force the translator to re-read $x.
if (isset($g)) {}
var_dump($x);
$x = null;
print "Test end\n";