Arquivos
hhvm/hphp/test/quick/closure_get_class.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

30 linhas
418 B
PHP

<?php
trait Too {
function bar() {
$a = function () {
var_dump(__CLASS__);
};
$a();
$a = function () {
var_dump(get_class());
};
$a();
if (isset($this)) {
$a = function () {
var_dump(get_class($this));
};
$a();
}
}
}
class Foo { use Too; }
$f = new Foo;
echo "Between\n";
$f->bar();
echo "Between\n";
$f::bar();
echo "Between\n";
Foo::bar();