男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

ReflectionClass::getDefaultProperties

(PHP 5, PHP 7, PHP 8)

ReflectionClass::getDefaultProperties獲取默認屬性

說(shuō)明

public ReflectionClass::getDefaultProperties(): array

獲取類(lèi)的默認屬性(包括了繼承的屬性)。

注意:

This method only works for static properties when used on internal classes. The default value of a static class property can not be tracked when using this method on user defined classes.

參數

此函數沒(méi)有參數。

返回值

默認屬性的數組,其鍵是屬性的名稱(chēng),其值是屬性的默認值或者在屬性沒(méi)有默認值時(shí)是 null。 這個(gè)函數不區分靜態(tài)和非靜態(tài)屬性,也不考慮可見(jiàn)性修飾符。

范例

示例 #1 ReflectionClass::getDefaultProperties() 例子

<?php
class Bar {
    protected 
$inheritedProperty 'inheritedDefault';
}

class 
Foo extends Bar {
    public 
$property 'propertyDefault';
    private 
$privateProperty 'privatePropertyDefault';
    public static 
$staticProperty 'staticProperty';
    public 
$defaultlessProperty;
}

$reflectionClass = new ReflectionClass('Foo');
var_dump($reflectionClass->getDefaultProperties());
?>

以上例程會(huì )輸出:

array(5) {
   ["staticProperty"]=>
   string(14) "staticProperty"
   ["property"]=>
   string(15) "propertyDefault"
   ["privateProperty"]=>
   string(22) "privatePropertyDefault"
   ["defaultlessProperty"]=>
   NULL
   ["inheritedProperty"]=>
   string(16) "inheritedDefault"
}

參見(jiàn)

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站