php-src/tests/classes/property_override_private_privateStatic.phpt
2018-10-14 19:45:12 +02:00

35 lines
459 B
PHP

--TEST--
Redeclare inherited private property as private static.
--FILE--
<?php
class A
{
private $p = "A::p";
function showA()
{
echo $this->p . "\n";
}
}
class B extends A
{
private static $p = "B::p (static)";
static function showB()
{
echo self::$p . "\n";
}
}
$a = new A;
$a->showA();
$b = new B;
$b->showA();
B::showB();
?>
--EXPECT--
A::p
A::p
B::p (static)