PHP 類(lèi)相關(guān)函數(shù)的使用詳解_PHP教程
推薦:PHP 自定義錯(cuò)誤處理函數(shù)的使用詳解本篇文章是對(duì)PHP自定義錯(cuò)誤處理函數(shù)的使用進(jìn)行了詳細(xì)的分析介紹。需要的朋友參考下
bool class_alias ( string $original , string $alias [, bool $autoload = TRUE ] ) — 為一個(gè)類(lèi)創(chuàng)建別名
bool class_exists ( string $class_name [, bool $autoload ] )— 檢查類(lèi)是否已定義
string get_called_class ( void ) —獲取靜態(tài)方法調(diào)用的類(lèi)名
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 )— 返回由類(lèi)的方法名組成的數(shù)組
array get_class_vars ( string $class_name )— 返回由類(lèi)的默認(rèn)屬性組成的數(shù)組
string get_class ([ object $obj ] )— 返回對(duì)象的類(lèi)名
array get_declared_classes ( void )— 返回當(dāng)前腳本中已定義類(lèi)的名字組成的數(shù)組
array get_declared_interfaces ( void )— 返回當(dāng)前腳本中所有已聲明的接口的名字?jǐn)?shù)組
array get_object_vars ( object $obj )— 返回由對(duì)象屬性組成的關(guān)聯(lián)數(shù)組
string get_parent_class ([ mixed $obj ] )— 返回對(duì)象或類(lèi)的父類(lèi)名
bool interface_exists ( string $interface_name [, bool $autoload ] )— 檢查接口是否已被定義
bool is_a ( object $object , string $class_name )— 如果對(duì)象屬于該類(lèi)或該類(lèi)是此對(duì)象的父類(lèi)則返回 TRUE
bool is_subclass_of ( object $object , string $class_name )— 檢測(cè)對(duì)象是該類(lèi)的子類(lèi)實(shí)例化得到的
bool method_exists ( object $object , string $method_name )— 檢查類(lèi)的方法是否存在
bool property_exists ( mixed $class , string $property ) — 檢查對(duì)象或類(lèi)是否具有該屬性
分享:解析php DOMElement 操作xml 文檔的實(shí)現(xiàn)代碼本篇文章是對(duì)在php中DOMElement 操作xml 文檔的實(shí)現(xiàn)進(jìn)行了分析介紹。需要的朋友參考下
- PHPNOW安裝Memcached擴(kuò)展方法詳解
- php記錄頁(yè)面代碼執(zhí)行時(shí)間
- PHP中獎(jiǎng)概率的抽獎(jiǎng)算法程序代碼
- apache設(shè)置靜態(tài)文件緩存方法介紹
- php對(duì)圖像的各種處理函數(shù)代碼小結(jié)
- PHP 關(guān)于訪問(wèn)控制的和運(yùn)算符優(yōu)先級(jí)介紹
- 關(guān)于PHP語(yǔ)言構(gòu)造器介紹
- php/js獲取客戶端mac地址的實(shí)現(xiàn)代碼
- php5.5新數(shù)組函數(shù)array_column使用
- PHP preg_match的匹配多國(guó)語(yǔ)言的技巧
- php 中序列化和json使用介紹
- php采集文章中的圖片獲取替換到本地
PHP教程Rss訂閱編程教程搜索
PHP教程推薦
- 將IP地址轉(zhuǎn)換為整型數(shù)字的PHP方法、Asp方法和MsSQL方法、MySQL方法
- 如何在HTML中利用js調(diào)用php的內(nèi)容
- 用php實(shí)現(xiàn)簡(jiǎn)單的滑動(dòng)菜單
- 深入php數(shù)據(jù)采集的詳解
- php正則匹配獲取指定url網(wǎng)頁(yè)頁(yè)面超級(jí)鏈接地址
- PHP應(yīng)用:PHP在linxu下的安裝與配置
- 讓PHP管理小型的郵件列表
- file_get_contents("php://input", "r")實(shí)例介紹
- PHP實(shí)例:一無(wú)限分類(lèi)的處理類(lèi)
- 評(píng)論:PHP程序不適用大型系統(tǒng)的九大原因
- 相關(guān)鏈接:
- 教程說(shuō)明:
PHP教程-PHP 類(lèi)相關(guān)函數(shù)的使用詳解
。