bug74673.phpt 575 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --TEST--
  2. Bug #74673 (Segfault when cast Reflection object to string with undefined constant)
  3. --FILE--
  4. <?php
  5. class A
  6. {
  7. public function method($test = PHP_SELF + 1)
  8. {
  9. }
  10. }
  11. $class = new ReflectionClass('A');
  12. echo $class;
  13. ?>
  14. --EXPECTF--
  15. Class [ <user> class A ] {
  16. @@ %s
  17. - Constants [0] {
  18. }
  19. - Static properties [0] {
  20. }
  21. - Static methods [0] {
  22. }
  23. - Properties [0] {
  24. }
  25. - Methods [1] {
  26. Method [ <user> public method method ] {
  27. @@ %s
  28. - Parameters [1] {
  29. Parameter #0 [ <optional> $test = PHP_SELF + 1 ]
  30. }
  31. }
  32. }
  33. }