• <sub id="h4knl"><ol id="h4knl"></ol></sub>
    <sup id="h4knl"></sup>
      <sub id="h4knl"></sub>

      <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
      1. <strong id="h4knl"></strong>

      2. PHP類相關函數的使用代碼詳解

        時間:2024-10-03 18:15:21 PHP 我要投稿
        • 相關推薦

        PHP類相關函數的使用代碼詳解

          bool class_alias ( string $original , string $alias [, bool $autoload = TRUE ] ) — 為一個類創建別名

          bool class_exists ( string $class_name [, bool $autoload ] )— 檢查類是否已定義

          string get_called_class ( void ) —獲取靜態方法調用的類名

          復制代碼 代碼如下:

          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 )— 返回由類的方法名組成的數組

          array get_class_vars ( string $class_name )— 返回由類的默認屬性組成的數組

          string get_class ([ object $obj ] )— 返回對象的類名

          array get_declared_classes ( void )— 返回當前腳本中已定義類的名字組成的數組

          array get_declared_interfaces ( void )— 返回當前腳本中所有已聲明的接口的名字數組

          array get_object_vars ( object $obj )— 返回由對象屬性組成的關聯數組

          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 )— 檢測對象是該類的子類實例化得到的

          bool method_exists ( object $object , string $method_name )— 檢查類的方法是否存在

          bool property_exists ( mixed $class , string $property ) — 檢查對象或類是否具有該屬性

        《&.doc》
        将本文的Word文档下载到电脑,方便收藏和打印
        推荐度:
        点击下载文档

        【PHP類相關函數的使用代碼詳解】相關文章:

        php對圖像的各種處理函數代碼總結07-03

        PHP url 加密解密函數代碼方法10-25

        PHP中函數的使用說明09-01

        php數組函數序列之array-combine() - 數組合并函數的代碼08-25

        關于深入PHP內存相關的功能特性詳解09-02

        關于PHP var-dump遍歷對象屬性的函數與應用代碼06-21

        PHP的壓縮函數06-21

        淺析php函數的實例06-08

        php如何過濾危險html代碼09-21

        將php實現過濾UBB代碼09-11

        在线咨询
        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码
      3. <sub id="h4knl"><ol id="h4knl"></ol></sub>
        <sup id="h4knl"></sup>
          <sub id="h4knl"></sub>

          <sub id="h4knl"><ol id="h4knl"><em id="h4knl"></em></ol></sub><s id="h4knl"></s>
          1. <strong id="h4knl"></strong>

          2. 亚洲午夜精品高潮影院 | 五月天AV电影在线播放 | 久久久一本精品99久久k精品66 | 亚洲2020久久久久久久 | 午夜性久久久性久久久久 | 最新亚洲日韩精品 |

            PHP類相關函數的使用代碼詳解

              bool class_alias ( string $original , string $alias [, bool $autoload = TRUE ] ) — 為一個類創建別名

              bool class_exists ( string $class_name [, bool $autoload ] )— 檢查類是否已定義

              string get_called_class ( void ) —獲取靜態方法調用的類名

              復制代碼 代碼如下:

              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 )— 返回由類的方法名組成的數組

              array get_class_vars ( string $class_name )— 返回由類的默認屬性組成的數組

              string get_class ([ object $obj ] )— 返回對象的類名

              array get_declared_classes ( void )— 返回當前腳本中已定義類的名字組成的數組

              array get_declared_interfaces ( void )— 返回當前腳本中所有已聲明的接口的名字數組

              array get_object_vars ( object $obj )— 返回由對象屬性組成的關聯數組

              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 )— 檢測對象是該類的子類實例化得到的

              bool method_exists ( object $object , string $method_name )— 檢查類的方法是否存在

              bool property_exists ( mixed $class , string $property ) — 檢查對象或類是否具有該屬性