mirror of
https://github.com/php/php-src.git
synced 2024-12-28 11:20:29 +08:00
33 lines
490 B
PHP
33 lines
490 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();
|
|
?>
|
|
--EXPECTF--
|
|
A::p (static)
|
|
A::p (static)
|
|
B::p (static)
|