bug29986.phpt 898 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --TEST--
  2. Reflection Bug #29986 (Class constants won't work with predefined constants when using ReflectionClass)
  3. --INI--
  4. precision=14
  5. --FILE--
  6. <?php
  7. class just_constants
  8. {
  9. const BOOLEAN_CONSTANT = true;
  10. const NULL_CONSTANT = null;
  11. const STRING_CONSTANT = 'This is a string';
  12. const INTEGER_CONSTANT = 1000;
  13. const FLOAT_CONSTANT = 3.14159265;
  14. }
  15. echo new ReflectionClass('just_constants');
  16. ?>
  17. --EXPECTF--
  18. Class [ <user> class just_constants ] {
  19. @@ %s %d-%d
  20. - Constants [5] {
  21. Constant [ public bool BOOLEAN_CONSTANT ] { 1 }
  22. Constant [ public null NULL_CONSTANT ] { }
  23. Constant [ public string STRING_CONSTANT ] { This is a string }
  24. Constant [ public int INTEGER_CONSTANT ] { 1000 }
  25. Constant [ public float FLOAT_CONSTANT ] { 3.14159265 }
  26. }
  27. - Static properties [0] {
  28. }
  29. - Static methods [0] {
  30. }
  31. - Properties [0] {
  32. }
  33. - Methods [0] {
  34. }
  35. }