Annotation of embedaddon/php/ext/reflection/tests/ReflectionParameter_getDeclaringFunction_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ReflectionParameter::getDeclaringFunction()
3: --CREDITS--
4: Stefan Koopmanschap <stefan@stefankoopmanschap.nl>
5: #testfest roosendaal on 2008-05-10
6: --FILE--
7: <?php
8: function ReflectionParameterTest($test, $test2 = null) {
9: echo $test;
10: }
11: $reflect = new ReflectionFunction('ReflectionParameterTest');
12: $params = $reflect->getParameters();
13: foreach($params as $key => $value) {
14: echo $value->getDeclaringFunction() . "\n";
15: }
16: ?>
17: ==DONE==
18: --EXPECTF--
19: Function [ <user> function ReflectionParameterTest ] {
20: @@ %s.php %d - %d
21:
22: - Parameters [2] {
23: Parameter #0 [ <required> $test ]
24: Parameter #1 [ <optional> $test2 = NULL ]
25: }
26: }
27:
28: Function [ <user> function ReflectionParameterTest ] {
29: @@ %s.php %d - %d
30:
31: - Parameters [2] {
32: Parameter #0 [ <required> $test ]
33: Parameter #1 [ <optional> $test2 = NULL ]
34: }
35: }
36:
37: ==DONE==
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>