ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
[TOC] ## 概述 ReflectionParameter 取回了函数或方法参数的相关信息。 ## 语法 ``` ReflectionParameter::allowsNull — Checks if null is allowed ReflectionParameter::canBePassedByValue — Returns whether this parameter can be passed by value ReflectionParameter::__clone — Clone ReflectionParameter::__construct — Construct ReflectionParameter::export — Exports ReflectionParameter::getClass — 获得类型提示类。 ReflectionParameter::getDeclaringClass — Gets declaring class ReflectionParameter::getDeclaringFunction — Gets declaring function ReflectionParameter::getDefaultValue — Gets default parameter value ReflectionParameter::getDefaultValueConstantName — Returns the default value's constant name if default value is constant or null ReflectionParameter::getName — Gets parameter name ReflectionParameter::getPosition — Gets parameter position ReflectionParameter::getType — Gets a parameter's type ReflectionParameter::hasType — Checks if parameter has a type ReflectionParameter::isArray — Checks if parameter expects an array ReflectionParameter::isCallable — Returns whether parameter MUST be callable ReflectionParameter::isDefaultValueAvailable — 检查是否有默认值。 ReflectionParameter::isDefaultValueConstant — Returns whether the default value of this parameter is a constant ReflectionParameter::isOptional — Checks if optional ReflectionParameter::isPassedByReference — Checks if passed by reference ReflectionParameter::isVariadic — Checks if the parameter is variadic ReflectionParameter::__toString — To string ```