php-src/tests/classes/property_override_privateStatic_protectedStatic.phpt
2018-10-14 19:45:12 +02:00

33 lines
481 B
PHP

--TEST--
Redeclare inherited private static property as protected static.
--FILE--
<?php
class A
{
private static $p = "A::p (static)";
static function showA()
{
echo self::$p . "\n";
}
}
class B extends A
{
protected static $p = "B::p (static)";
static function showB()
{
echo self::$p . "\n";
}
}
A::showA();
B::showA();
B::showB();
?>
--EXPECT--
A::p (static)
A::p (static)
B::p (static)