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