bug49472.phpt 364 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #49472 (Constants defined in Interfaces can be overridden)
  3. --FILE--
  4. <?php
  5. interface ia {
  6. const c = 'Sea';
  7. const y = 2;
  8. }
  9. class Foo implements ia {
  10. }
  11. class FooBar extends Foo implements ia {
  12. const x = 1;
  13. const c = 'Ocean';
  14. public function show() {
  15. return ia::c;
  16. }
  17. }
  18. new FooBar;
  19. ?>
  20. ===DONE===
  21. --EXPECT--
  22. ===DONE===