blob: 2c71c678d350dc50573802251cb19286a40ad33c (
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
|
--TEST--
Late Static Binding static:: accesses protected / public static variables of child
class when the variable is private in parent class
--FILE--
<?php
class A {
private static $value = 'A';
public static function out() {
echo static::$value, PHP_EOL;
}
}
class B extends A {
protected static $value = 'B';
}
class C extends A {
public static $value = 'C';
}
A::out();
B::out();
C::out();
--EXPECT--
A
B
C
|