traits002.phpt 556 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --TEST--
  2. ReflectionClass and Traits
  3. --FILE--
  4. <?php
  5. abstract class foo {
  6. }
  7. trait bar {
  8. }
  9. echo new ReflectionClass('foo'), "\n";
  10. echo new ReflectionClass('bar'), "\n";
  11. ?>
  12. --EXPECTF--
  13. Class [ <user> abstract class foo ] {
  14. @@ %s 3-4
  15. - Constants [0] {
  16. }
  17. - Static properties [0] {
  18. }
  19. - Static methods [0] {
  20. }
  21. - Properties [0] {
  22. }
  23. - Methods [0] {
  24. }
  25. }
  26. Trait [ <user> trait bar ] {
  27. @@ %s 6-8
  28. - Constants [0] {
  29. }
  30. - Static properties [0] {
  31. }
  32. - Static methods [0] {
  33. }
  34. - Properties [0] {
  35. }
  36. - Methods [0] {
  37. }
  38. }