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