blob: 59132bf6ce0d37ea1cbff0feb0831271e6324def (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
--TEST--
Redeclare inherited protected property as public static.
--FILE--
<?php
class A
{
protected $p = "A::p";
function showA()
{
echo $this->p . "\n";
}
}
class B extends A
{
public static $p = "B::p (static)";
static function showB()
{
echo self::$p . "\n";
}
}
$a = new A;
$a->showA();
$b = new B;
$b->showA();
B::showB();
?>
--EXPECTF--
Fatal error: Cannot redeclare non static A::$p as static B::$p in %s on line 18
|