xref: /PHP-8.0/Zend/tests/bug76860_2.phpt (revision f8d79582)
1--TEST--
2Bug #76860 (Missed "Accessing static property as non static" warning)
3--FILE--
4<?php
5class A {
6    private static $a = "a";
7    private static $b = "b";
8    private static $c = "c";
9    public function __construct() {
10    var_dump($this->a, $this->b, $this->c);
11    }
12}
13class B extends A {
14    private static $a = "a1";
15    protected static $b = "b1";
16    public static $c = "c1";
17}
18new B;
19?>
20--EXPECTF--
21Notice: Accessing static property B::$a as non static in %sbug76860_2.php on line 7
22
23Warning: Undefined property: B::$a in %s on line %d
24
25Notice: Accessing static property B::$b as non static in %sbug76860_2.php on line 7
26
27Warning: Undefined property: B::$b in %s on line %d
28
29Notice: Accessing static property B::$c as non static in %sbug76860_2.php on line 7
30
31Warning: Undefined property: B::$c in %s on line %d
32NULL
33NULL
34NULL
35