PHP get_class_methods函數用法_PHP教程

來源:互聯網
上載者:User

PHP get_class_methods函數用法


get_class_methods 函數的作用是返回由類的方法名組成的數組。本篇文章將簡要的分享一下該函數的相關用法。

函數原型 array get_class_methods ( mixed $class_name )

返回由 class_name 指定的類中定義的方法名所組成的數組。如果出錯,則返回 NULL。

注意: 從 PHP 4.0.6 開始,可以指定對象本身來代替 class_name。get_class_methods() 使用的具體樣本如下:

';}

上例將輸出:

myclass
myfunc1
myfunc2

注意:

自 PHP 5 起,本函數按照方法被定義的名字返回(區分大小寫)。在 PHP 4 中總是返回小寫。

您可能感興趣的文章

  • php利用session_set_save_handler()函數將session儲存到MySQL資料庫中
  • php get_headers函數的作用及用法
  • php 類比get_headers函數
  • PHP中file_get_contents於curl效能效率比較
  • phpMyAdmin Cannot start session without errors錯誤解決辦法
  • php get_headers 判斷URL是否有效
  • 擷取子class_id集合的函數
  • php mktime 函數分析

http://www.bkjia.com/PHPjc/906826.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/906826.htmlTechArticlePHP get_class_methods函數用法 get_class_methods 函數的作用是返回由類的方法名組成的數組。本篇文章將簡要的分享一下該函數的相關用法。 函數...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.