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

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