bug33389.phpt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --TEST--
  2. Reflection Bug #33389 (double free() when exporting a ReflectionClass)
  3. --FILE--
  4. <?php
  5. define ('foobar', 1);
  6. class Test {
  7. function foo1($arg=foobar) {
  8. }
  9. function foo2($arg=null) {
  10. }
  11. function foo3($arg=false) {
  12. }
  13. function foo4($arg='foo') {
  14. }
  15. function foo5($arg=1) {
  16. }
  17. function bar($arg) {
  18. }
  19. function foo() {
  20. }
  21. }
  22. echo new ReflectionClass('Test');
  23. ?>
  24. --EXPECTF--
  25. Class [ <user> class Test ] {
  26. @@ %sbug33389.php 3-18
  27. - Constants [0] {
  28. }
  29. - Static properties [0] {
  30. }
  31. - Static methods [0] {
  32. }
  33. - Properties [0] {
  34. }
  35. - Methods [7] {
  36. Method [ <user> public method foo1 ] {
  37. @@ %sbug33389.php 4 - 5
  38. - Parameters [1] {
  39. Parameter #0 [ <optional> $arg = foobar ]
  40. }
  41. }
  42. Method [ <user> public method foo2 ] {
  43. @@ %sbug33389.php 6 - 7
  44. - Parameters [1] {
  45. Parameter #0 [ <optional> $arg = NULL ]
  46. }
  47. }
  48. Method [ <user> public method foo3 ] {
  49. @@ %sbug33389.php 8 - 9
  50. - Parameters [1] {
  51. Parameter #0 [ <optional> $arg = false ]
  52. }
  53. }
  54. Method [ <user> public method foo4 ] {
  55. @@ %sbug33389.php 10 - 11
  56. - Parameters [1] {
  57. Parameter #0 [ <optional> $arg = 'foo' ]
  58. }
  59. }
  60. Method [ <user> public method foo5 ] {
  61. @@ %sbug33389.php 12 - 13
  62. - Parameters [1] {
  63. Parameter #0 [ <optional> $arg = 1 ]
  64. }
  65. }
  66. Method [ <user> public method bar ] {
  67. @@ %sbug33389.php 14 - 15
  68. - Parameters [1] {
  69. Parameter #0 [ <required> $arg ]
  70. }
  71. }
  72. Method [ <user> public method foo ] {
  73. @@ %sbug33389.php 16 - 17
  74. }
  75. }
  76. }