久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php如何判斷方法和屬性是否存在

      php判斷方法和屬性是否存在的方法:【method_exists(mixed $object,string $method_name );property_exists(mixed $class,string $property);】。

      php如何判斷方法和屬性是否存在

      本文操作環(huán)境:windows10系統(tǒng)、php 7、thinkpad t480電腦。

      php判斷類里面的某個方法是否存在:

      bool method_exists ( mixed $object , string $method_name ) 檢查類的方法是否存在,例如:

      $directory=new Directory; if(!method_exists($directory,'read')){     echo '未定義read方法!'; }

      php 判斷類里面的某個屬性是否已經(jīng)定義:

      bool property_exists(mixed $class,string $property)檢查類的屬性是否存在,例如:

      $directory=new Directory; if(!property_exists($directory,'li')){     echo '未定義li屬性!'; }

      推薦學(xué)習(xí):php培訓(xùn)

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