ReflectionParameter::getClass

(PHP 5, PHP 7)

ReflectionParameter::getClass锟斤拷锟斤拷锟斤拷锟斤拷锟绞撅拷唷�

说锟斤拷

public ReflectionParameter::getClass ( void ) : ReflectionClass

锟斤拷取锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷示锟洁,锟斤拷锟斤拷为ReflectionClass锟斤拷锟斤拷

Warning

锟斤拷锟斤拷锟斤拷锟斤拷未锟斤拷写锟侥碉拷锟斤拷锟斤拷锟叫诧拷锟斤拷锟叫憋拷

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

一锟斤拷 ReflectionClass 锟斤拷锟斤拷

锟斤拷锟斤拷

Example #1 使锟斤拷 ReflectionParameter 锟斤拷

<?php
function foo(Exception $a) { }

$functionReflection = new ReflectionFunction('foo');
$parameters $functionReflection->getParameters();
$aParameter $parameters[0];

echo 
$aParameter->getClass()->name;
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

Exception

锟轿硷拷