久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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支持回調(diào)的函數(shù)有哪些?

      PHP支持回調(diào)的函數(shù)有:1、匿名函數(shù),代碼為【$server->on 'Request'】;2、類靜態(tài)方法,代碼為【static function test $req】;3、函數(shù),代碼為【my_onRequest $req】。

      PHP支持回調(diào)的函數(shù)有哪些?

      PHP支持回調(diào)的函數(shù)有:

      1、匿名函數(shù)

      $server->on('Request', function ($req, $resp) use ($a, $b, $c) {     echo "hello world"; });

      可使用use向匿名函數(shù)傳遞參數(shù)

      2、類靜態(tài)方法

      class A {     static function test($req, $resp)     {         echo "hello world";     } } $server->on('Request', 'A::Test'); $server->on('Request', array('A', 'Test'));

      3、函數(shù)

      function my_onRequest($req, $resp) {     echo "hello world"; } $server->on('Request', 'my_onRequest');

      4、對(duì)象方法

      class A {     function test($req, $resp)     {         echo "hello world";     } } $object = new A(); $server->on('Request', array($object, 'test'));

      相關(guān)學(xué)習(xí)推薦:PHP編程從入門(mén)到精通

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