xref: /PHP-8.2/Zend/tests/lsb_024.phpt (revision c1e977f1)
1--TEST--
2Late Static Binding static:: accesses protected / public static variables of child
3class when the variable is private in parent class
4--FILE--
5<?php
6class A {
7    private static $value = 'A';
8
9    public static function out() {
10        echo static::$value, PHP_EOL;
11    }
12}
13class B extends A {
14    protected static $value = 'B';
15}
16class C extends A {
17    public static $value = 'C';
18}
19A::out();
20B::out();
21C::out();
22--EXPECT--
23A
24B
25C
26