traits.php 261 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace {
  3. trait TFoo {
  4. }
  5. class CFoo
  6. {
  7. use TFoo;
  8. }
  9. }
  10. namespace Foo {
  11. trait TBar {
  12. }
  13. interface IBar {
  14. }
  15. trait TFooBar {
  16. }
  17. class CBar implements IBar
  18. {
  19. use TBar, TFooBar;
  20. }
  21. }