mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
34 lines
467 B
Plaintext
34 lines
467 B
Plaintext
|
--TEST--
|
||
|
Redeclare inherited private static property as protected.
|
||
|
--FILE--
|
||
|
<?php
|
||
|
class A
|
||
|
{
|
||
|
private static $p = "A::p (static)";
|
||
|
static function showA()
|
||
|
{
|
||
|
echo self::$p . "\n";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class B extends A
|
||
|
{
|
||
|
protected $p = "B::p";
|
||
|
function showB()
|
||
|
{
|
||
|
echo $this->p . "\n";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
A::showA();
|
||
|
|
||
|
$b = new B;
|
||
|
$b->showA();
|
||
|
$b->showB();
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
A::p (static)
|
||
|
A::p (static)
|
||
|
B::p
|