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

44 linhas
571 B
PHP

<?php
class X {
protected function foo() {
echo "X::foo\n";
}
private function bar() {
echo "X::bar\n";
}
private function baz() {
echo "X::baz\n";
}
}
class Y extends X {
protected function bar() {
echo "Y::bar\n";
}
}
class A extends Y {
protected function foo() {
echo "A::foo\n";
}
protected function bar() {
echo "A::bar\n";
}
protected function baz() {
echo "A::bar\n";
}
}
class B extends Y {
function foo() {
$a = new A;
$a->foo();
$a->bar();
# $a->baz();
}
}
$b = new B;
$b->foo();