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

<?
class V { const X = 10; }
function &values() {
static $VALUES = array(
'X' => V::X,
);
return $VALUES;
}
function foo() { var_dump(values()['X']); }
foo();
foo();
class T {
public $var;
function f() {
echo $this->var - 3;
}
}
$a = 33;
$t = new T();
$t->var = &$a;
$t->f();
$a = 10000;
$t->f();