summaryrefslogtreecommitdiff
path: root/tests/classes/property_override_publicStatic_privateStatic.phpt
blob: d41db6da38bb8d8f0093ce9eeaa49a2f2c43523e (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 public static property as private static.
--FILE--
<?php
  class A
  {
      public static $p = "A::p (static)";
      static function showA()
      {
          echo self::$p . "\n";
      }
  }
  
  class B extends A
  {
      private static $p = "B::p (static)";
      static function showB()
      {
          echo self::$p . "\n";
      }
  }
  
  
  A::showA();
  
  B::showA();
  B::showB();
?>
--EXPECTF--

Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18