Arquivos
hhvm/hphp/test/quick/properties2.php
T
Paul Tarjan 6e391b3c51 add Facebook test suite
We've been sprinkling FB-specific stuff into other tests. I think having a dedicated suite will make it obvious where to put things. I looked at all the failing tests when running the open source build and moved them here. I also had to rejigger the flib include, since that didn't work in repo mode.
2013-05-20 13:52:28 -07:00

27 linhas
376 B
PHP

<?php
class X {
protected function foo() { echo "X::foo\n"; }
private function bar() { echo "X::bar\n"; }
protected $field = 1;
};
class A extends X {
protected function foo() {
echo "A::foo " . $this->field . "\n";
}
};
class B extends X {
function foo() {
$a = new A;
$a->foo();
$a->field = 123;
$a->foo();
}
};
$b = new B;
$b->foo();