mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
29 lines
384 B
PHP
29 lines
384 B
PHP
--TEST--
|
|
ZE2 A derived class does not know about privates of ancestors
|
|
--FILE--
|
|
<?php
|
|
|
|
class Bar {
|
|
public static function pub() {
|
|
Bar::priv();
|
|
}
|
|
private static function priv() {
|
|
echo "Bar::priv()\n";
|
|
}
|
|
}
|
|
class Foo extends Bar {
|
|
public static function priv() {
|
|
echo "Foo::priv()\n";
|
|
}
|
|
}
|
|
|
|
Foo::pub();
|
|
Foo::priv();
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Bar::priv()
|
|
Foo::priv()
|
|
Done
|