Arquivos
hhvm/hphp/test/vm/exceptions5.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
523 B
PHP

<?php
function g($obj) {
echo "g\n";
$obj->yar(123);
}
class D {
public function yar($y) {
$x = $y;
}
public function __destruct() {
g($this);
}
}
class C {
public function baz($z) {
return $z = call_user_func(array($this,'foo'), $z);
}
public function bar($z) {
return $z = call_user_func(array($this,'baz'), $z);
}
public function foo($z) {
$guard = new D;
return $z = call_user_func(array($this,'bar'), $z);
}
}
function bar() {
$obj = new C;
$obj->foo(123);
}
bar();