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

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();