bug60809.phpt 552 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. Bug #60809 (TRAITS - PHPDoc Comment Style Bug)
  3. --FILE--
  4. <?php
  5. class ExampleParent {
  6. private $hello_world = "hello foo\n";
  7. public function foo() {
  8. echo $this->hello_world;
  9. }
  10. }
  11. class Example extends ExampleParent {
  12. use ExampleTrait;
  13. }
  14. trait ExampleTrait {
  15. /**
  16. *
  17. */
  18. private $hello_world = "hello bar\n";
  19. /**
  20. *
  21. */
  22. public $prop = "ops";
  23. public function bar() {
  24. echo $this->hello_world;
  25. }
  26. }
  27. $x = new Example();
  28. $x->foo();
  29. $x->bar();
  30. ?>
  31. --EXPECT--
  32. hello foo
  33. hello bar