久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放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如何使用SplQueue::__construct()函數(shù)?

      本篇文章給大家介紹一下PHP使用“SplQueue::__construct()”函數(shù)的方法。有一定的參考價值,有需要的朋友可以參考一下,希望對大家有所幫助。

      PHP如何使用SplQueue::__construct()函數(shù)?

      PHP如何使用SplQueue::__construct()函數(shù)?示例

      SplQueue::__construct()函數(shù)是PHP中的內(nèi)置函數(shù), 用于構建使用雙鏈表實現(xiàn)的隊列。

      語法如下:

      void SplQueue::__construct(void)

      參數(shù):此函數(shù)不接受任何參數(shù)。

      返回值:此函數(shù)不返回任何值。

      下面的程序說明了SplQueue::__ construct()PHP中的函數(shù):

      程序1:

      <?php    // Create a new empty queue $q = new SplQueue();    $q [] = 1; $q [] = 2; $q [] = 3;    // Print the queue elements echo $q [0] . "n" ; echo $q [1] . "n" ; echo $q [2] . "n" ; ?>

      輸出如下:

      1 2 3

      程式2:

      <?php    // Create some fixed size array $gfg = new SplQueue();    $gfg [] = 1; $gfg [] = 5; $gfg [] = 1; $gfg [] = 11; $gfg [] = 15; $gfg [] = 17;    foreach ( $gfg as $elem )  {      echo $elem . "n" ; } ?>

      輸出如下:

      1 5 1 11 15 17

      推薦學習:php視頻教程

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