mirror of
https://github.com/php/php-src.git
synced 2024-12-17 13:59:28 +08:00
35 lines
421 B
PHP
35 lines
421 B
PHP
--TEST--
|
|
Redeclare inherited private property as private.
|
|
--FILE--
|
|
<?php
|
|
class A
|
|
{
|
|
private $p = "A::p";
|
|
function showA()
|
|
{
|
|
echo $this->p . "\n";
|
|
}
|
|
}
|
|
|
|
class B extends A
|
|
{
|
|
private $p = "B::p";
|
|
function showB()
|
|
{
|
|
echo $this->p . "\n";
|
|
}
|
|
}
|
|
|
|
|
|
$a = new A;
|
|
$a->showA();
|
|
|
|
$b = new B;
|
|
$b->showA();
|
|
$b->showB();
|
|
?>
|
|
--EXPECT--
|
|
A::p
|
|
A::p
|
|
B::p
|