久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php如何查看類(lèi)的方法

      要想查看php中類(lèi)的方法,我們可以利用get_class_methods()方法來(lái)實(shí)現(xiàn)。該函數(shù)可以返回由類(lèi)的方法名組成的數(shù)組,例如:【get_class_methods($my_object)】。

      php如何查看類(lèi)的方法

      get_class_methods — 返回由類(lèi)的方法名組成的數(shù)組。

      (推薦教程:php圖文教程)

      說(shuō)明

      array get_class_methods ( mixed $class_name )

      返回由 class_name 指定的類(lèi)中定義的方法名所組成的數(shù)組。如果出錯(cuò),則返回 NULL。

      注意: 從 PHP 4.0.6 開(kāi)始,可以指定對(duì)象本身來(lái)代替 class_name,例如

      <?php     $class_methods = get_class_methods($my_object); // see below the full example ?>

      (學(xué)習(xí)視頻推薦:php視頻教程)

      舉例:

      <?php class myclass {     // constructor     function myclass()     {         return (true);     }       // method 1     function myfunc1()     {         return (true);     }       // method 2     function myfunc2()     {         return (true);     } }   $class_methods = get_class_methods('myclass');   // or $class_methods = get_class_methods(new myclass()); foreach ($class_methods as $method_name) {     echo "$method_name"; }

      輸出:

      myclass myfunc1 myfunc2

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)