mirror of
https://github.com/php/php-src.git
synced 2024-12-16 05:15:03 +08:00
34 lines
452 B
PHP
34 lines
452 B
PHP
--TEST--
|
|
Redeclare inherited private static property as public.
|
|
--FILE--
|
|
<?php
|
|
class A
|
|
{
|
|
private static $p = "A::p (static)";
|
|
static function showA()
|
|
{
|
|
echo self::$p . "\n";
|
|
}
|
|
}
|
|
|
|
class B extends A
|
|
{
|
|
public $p = "B::p";
|
|
function showB()
|
|
{
|
|
echo $this->p . "\n";
|
|
}
|
|
}
|
|
|
|
|
|
A::showA();
|
|
|
|
$b = new B;
|
|
$b->showA();
|
|
$b->showB();
|
|
?>
|
|
--EXPECT--
|
|
A::p (static)
|
|
A::p (static)
|
|
B::p
|