363d1bb20f
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.
57 linhas
933 B
PHP
57 linhas
933 B
PHP
<?php
|
|
|
|
class aa {
|
|
protected function blah() {
|
|
echo "protected aa::blah\n";
|
|
var_dump($this);
|
|
}
|
|
|
|
protected function func($o) {
|
|
echo "protected aa::blah\n";
|
|
var_dump($o === $this);
|
|
}
|
|
|
|
public static function callfunc() {
|
|
self::func(null);
|
|
self::func(null);
|
|
}
|
|
|
|
public function __call($name, $args) {
|
|
$args = count($args);
|
|
echo "magic call to aa->$name with $args arguments\n";
|
|
}
|
|
}
|
|
|
|
class a extends aa {
|
|
protected function blah() {
|
|
echo "private a::blah\n";
|
|
}
|
|
|
|
public static function stat() {
|
|
echo "public static a::stat\n";
|
|
}
|
|
|
|
public function nons() {
|
|
$str = 'blah';
|
|
self::$str();
|
|
self::stat();
|
|
parent::blah();
|
|
|
|
parent::func(null);
|
|
parent::func($this);
|
|
parent::func(null);
|
|
parent::func($this);
|
|
|
|
parent::callfunc();
|
|
|
|
self::fakemethod(1, 2, 3);
|
|
self::fakemethod();
|
|
}
|
|
}
|
|
|
|
function main() {
|
|
$a = new a();
|
|
$a->nons();
|
|
}
|
|
main();
|