mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
34 lines
489 B
PHP
34 lines
489 B
PHP
--TEST--
|
|
Redeclare inherited protected static property as public static.
|
|
--FILE--
|
|
<?php
|
|
class A
|
|
{
|
|
protected static $p = "A::p (static)";
|
|
static function showA()
|
|
{
|
|
echo self::$p . "\n";
|
|
}
|
|
}
|
|
|
|
class B extends A
|
|
{
|
|
public 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)
|
|
|