summaryrefslogtreecommitdiff
path: root/tests/classes/property_override_privateStatic_private.phpt
blob: b2985add7db8e582ee06883e02f46c0a1e3ac197 (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
33
--TEST--
Redeclare inherited private static property as private.
--FILE--
<?php
  class A
  {
      private static $p = "A::p (static)";
      static function showA()
      {
          echo self::$p . "\n";
      }
  }
  
  class B extends A
  {
      private $p = "B::p";
      function showB()
      {
          echo $this->p . "\n";
      }
  }
  
  
  A::showA();
  
  $b = new B;
  $b->showA();
  $b->showB();
?>
--EXPECT--
A::p (static)
A::p (static)
B::p