2008-01-30 14:25:57 +00:00
|
|
|
--TEST--
|
|
|
|
Redeclare inherited private property as public static.
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class A
|
|
|
|
{
|
|
|
|
private $p = "A::p";
|
|
|
|
function showA()
|
|
|
|
{
|
|
|
|
echo $this->p . "\n";
|
|
|
|
}
|
|
|
|
}
|
2018-09-16 17:16:42 +00:00
|
|
|
|
2008-01-30 14:25:57 +00:00
|
|
|
class B extends A
|
|
|
|
{
|
|
|
|
public static $p = "B::p (static)";
|
|
|
|
static function showB()
|
|
|
|
{
|
|
|
|
echo self::$p . "\n";
|
|
|
|
}
|
|
|
|
}
|
2018-09-16 17:16:42 +00:00
|
|
|
|
|
|
|
|
2008-01-30 14:25:57 +00:00
|
|
|
$a = new A;
|
|
|
|
$a->showA();
|
2018-09-16 17:16:42 +00:00
|
|
|
|
2008-01-30 14:25:57 +00:00
|
|
|
$b = new B;
|
|
|
|
$b->showA();
|
|
|
|
B::showB();
|
|
|
|
?>
|
2018-02-19 08:59:41 +00:00
|
|
|
--EXPECT--
|
2008-01-30 14:25:57 +00:00
|
|
|
A::p
|
|
|
|
A::p
|
|
|
|
B::p (static)
|