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

36 linhas
474 B
PHP

<?php
class A {
public function foo() {
print "A::foo\n";
$this->bar();
}
protected function baz() {
print "A::baz\n";
}
private function f() {
echo "A::f\n";
}
public function g($a) {
echo "A::g\n";
$a->f();
}
}
class B extends A {
protected function bar() {
print "B::bar\n";
$this->baz();
}
public function h($a) {
print "B::g\n";
$a->f();
}
}
$a = new A;
$b = new B();
$b->foo();
$b->g($a);
#$b->h($a);