最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

PHP 類相關(guān)函數(shù)的使用詳解

 更新時(shí)間:2013年05月10日 17:09:17   作者:  
本篇文章是對PHP類的相關(guān)函數(shù)的使用進(jìn)行了分析介紹。需要的朋友參考下

bool class_alias ( string $original , string $alias [, bool $autoload = TRUE ] ) — 為一個(gè)類創(chuàng)建別名
bool class_exists ( string $class_name [, bool $autoload ] )— 檢查類是否已定義
string get_called_class ( void ) —獲取靜態(tài)方法調(diào)用的類名

復(fù)制代碼 代碼如下:

class foo {
    static public function test(){
        var_dump(get_called_class());
    }
}
class bar extends foo {}
foo::test();
bar::test();

array get_class_methods ( mixed $class_name )— 返回由類的方法名組成的數(shù)組
array get_class_vars ( string $class_name )— 返回由類的默認(rèn)屬性組成的數(shù)組
string get_class ([ object $obj ] )— 返回對象的類名
array get_declared_classes ( void )— 返回當(dāng)前腳本中已定義類的名字組成的數(shù)組
array get_declared_interfaces ( void )— 返回當(dāng)前腳本中所有已聲明的接口的名字?jǐn)?shù)組
array get_object_vars ( object $obj )— 返回由對象屬性組成的關(guān)聯(lián)數(shù)組
string get_parent_class ([ mixed $obj ] )— 返回對象或類的父類名
bool interface_exists ( string $interface_name [, bool $autoload ] )— 檢查接口是否已被定義
bool is_a ( object $object , string $class_name )— 如果對象屬于該類或該類是此對象的父類則返回 TRUE
bool is_subclass_of ( object $object , string $class_name )— 檢測對象是該類的子類實(shí)例化得到的
bool method_exists ( object $object , string $method_name )— 檢查類的方法是否存在
bool property_exists ( mixed $class , string $property ) — 檢查對象或類是否具有該屬性

相關(guān)文章

最新評論

沾益县| 历史| 尼玛县| 合川市| 秦皇岛市| 开鲁县| 上饶县| 肥城市| 吴忠市| 皮山县| 静海县| 盐池县| 三亚市| 且末县| 关岭| 铜川市| 民丰县| 溆浦县| 金乡县| 林西县| 乌审旗| 盐边县| 焦作市| 河间市| 沁阳市| 中卫市| 建阳市| 渝北区| 台山市| 肃南| 建宁县| 梓潼县| 九龙城区| 刚察县| 巢湖市| 云安县| 西青区| 仪征市| 宣威市| 三原县| 昭通市|