bug76860_2.phpt 842 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. Bug #76860 (Missed "Accessing static property as non static" warning)
  3. --FILE--
  4. <?php
  5. class 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. }
  13. class B extends A {
  14. private static $a = "a1";
  15. protected static $b = "b1";
  16. public static $c = "c1";
  17. }
  18. new B;
  19. ?>
  20. --EXPECTF--
  21. Notice: Accessing static property B::$a as non static in %sbug76860_2.php on line 7
  22. Warning: Undefined property: B::$a in %s on line %d
  23. Notice: Accessing static property B::$b as non static in %sbug76860_2.php on line 7
  24. Warning: Undefined property: B::$b in %s on line %d
  25. Notice: Accessing static property B::$c as non static in %sbug76860_2.php on line 7
  26. Warning: Undefined property: B::$c in %s on line %d
  27. NULL
  28. NULL
  29. NULL