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

24 linhas
438 B
PHP

<?php
class B {
const MYCONST = "B::MYCONST";
public static function foo() {
echo "B::foo\n";
}
}
class C extends B {
const MYCONST = "C::MYCONST";
public static function foo() {
echo "C::foo\n";
}
public static function test() {
$arr = array('foo');
self::foo();
parent::foo();
self::$arr[0]();
parent::$arr[0]();
echo self::MYCONST . "\n";
echo parent::MYCONST . "\n";
}
}
C::test();