ReflectionObject___toString_basic2.phpt 592 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --TEST--
  2. ReflectionObject::__toString() : very basic test with dynamic properties
  3. --FILE--
  4. <?php
  5. class Foo {
  6. public $bar = 1;
  7. }
  8. $f = new foo;
  9. $f->dynProp = 'hello';
  10. $f->dynProp2 = 'hello again';
  11. echo new ReflectionObject($f);
  12. ?>
  13. --EXPECTF--
  14. Object of class [ <user> class Foo ] {
  15. @@ %s 3-5
  16. - Constants [0] {
  17. }
  18. - Static properties [0] {
  19. }
  20. - Static methods [0] {
  21. }
  22. - Properties [1] {
  23. Property [ public $bar = 1 ]
  24. }
  25. - Dynamic properties [2] {
  26. Property [ <dynamic> public $dynProp ]
  27. Property [ <dynamic> public $dynProp2 ]
  28. }
  29. - Methods [0] {
  30. }
  31. }