<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## **ReflectionParameter取回了函數或方法參數的相關信息** ``` ReflectionParameter implements Reflector { /* 屬性 */ public $name ; //參數的名稱。只讀,在嘗試賦值的時候會拋出 ReflectionException。 /* 方法 */ public allowsNull ( void ) : bool //檢查是否允許null public canBePassedByValue ( void ) : bool //返回此參數是否可以按值傳遞 final private __clone ( void ) : void //克隆 public __construct ( string $function , string $parameter ) public static export ( string $function , string $parameter [, bool $return ] ) : string //導出 public getClass ( void ) : ReflectionClass // 獲得類型提示類。 public getDeclaringClass ( void ) : ReflectionClass //獲取聲明類 public getDeclaringFunction ( void ) : ReflectionFunctionAbstract //獲取聲明函數 public getDefaultValue ( void ) : mixed //獲取默認參數值 public getDefaultValueConstantName ( void ) : string //如果默認值為常量或null,則返回默認值的常量名稱 public getName ( void ) : string //獲取參數名稱 public getPosition ( void ) : int //獲取參數位置 public getType ( void ) : ReflectionType //獲取參數的類型 public hasType ( void ) : bool //檢查參數是否具有類型 public isArray ( void ) : bool //檢查參數是否是數組 public isCallable ( void ) : bool //返回參數是否必須可調用 public isDefaultValueAvailable ( void ) : bool //檢查是否有默認值。 public isDefaultValueConstant ( void ) : bool //返回此參數的默認值是否為常量 public isOptional ( void ) : bool //檢查是否可選 public isPassedByReference ( void ) : bool //檢查是否通過引用傳遞 public isVariadic ( void ) : bool //檢查參數是否為可變參數 public __toString ( void ) : string //被當做字符串調用時觸發 } ``` ## **例子:** ``` <?php class User{ private $name='張三'; private $age='18'; function getname(){ echo $this->name; } protected function getage(){ echo $this->$age; } protected function setInfo($name,$age){ $this->age=$age; $this->name=$name; } } function set_info($name,$age){} echo '<pre>'; $method=new ReflectionMethod('User','setInfo'); // 建立 Person這個類的反射類 $params=$method->getParameters(); var_dump($params); /* array(2) { [0]=> object(ReflectionParameter)#6 (1) { ["name"]=> string(4) "name" } [1]=> object(ReflectionParameter)#7 (1) { ["name"]=> string(3) "age" } } */ $params1 = new ReflectionParameter(array('User', 'setInfo'), 0); $params2 = new ReflectionParameter(array('User', 'setInfo'), 'name'); var_dump($params1); /* object(ReflectionParameter)#1 (1) { ["name"]=> string(4) "name" } */ $params2 = new ReflectionParameter(array('User', 'setInfo'), 1); $params2 = new ReflectionParameter(array('User', 'setInfo'), 'age'); var_dump($params2); /* object(ReflectionParameter)#2 (1) { ["name"]=> string(3) "age" } */ $p1 = new ReflectionParameter('set_info', 0); $p1 = new ReflectionParameter('set_info', 'name'); var_dump($p1); /* object(ReflectionParameter)#3 (1) { ["name"]=> string(4) "name" } */ $p2 = new ReflectionParameter('set_info', 1); $p2 = new ReflectionParameter('set_info', 'age'); var_dump($p2); /* object(ReflectionParameter)#1 (1) { ["name"]=> string(3) "age" } */ ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看