1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問(wèn)題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
      php遍歷樹(shù)的常用方法有哪些-創(chuàng)新互聯(lián)

      這篇文章主要介紹php遍歷樹(shù)的常用方法有哪些,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!

      成都創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供未央網(wǎng)站建設(shè)、未央做網(wǎng)站、未央網(wǎng)站設(shè)計(jì)、未央網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)與制作、未央企業(yè)網(wǎng)站模板建站服務(wù),10余年未央做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。

      具體如下:

      一、遞歸的深度優(yōu)先的算法:

      ----------------------- Test run for '.$func.'() ';
        flush();
        $time_start = microtime(true);
        $list = $func($trydir);
        //print_r($list);
        $time = microtime(true) - $time_start;
        echo 'Finished : '.count($list).' files
      ';   $mem2 = memory_get_peak_usage();   printf('
      Max memory for '.$func.'() : %0.2f kbytes Running time for '.$func.'() : %0.f s
      ',   ($mem2-$mem1)/1024.0, $time);   return $list; } profile('rec_list_files', "D:\www\server"); ?>

      二、遞歸的深度優(yōu)先的算法(用了一個(gè)棧來(lái)實(shí)現(xiàn))

      ----------------------- Test run for '.$func.'() ';
        flush();
        $time_start = microtime(true);
        $list = $func($trydir);
        //print_r($list);
        $time = microtime(true) - $time_start;
        echo 'Finished : '.count($list).' files
      ';   $mem2 = memory_get_peak_usage();   printf('
      Max memory for '.$func.'() : %0.2f kbytes Running time for '.$func.'() : %0.f s
      ',   ($mem2-$mem1)/1024.0, $time);   return $list; } profile('deep_first_list_files', "D:\www\server"); ?>

      三、非遞歸的廣度優(yōu)先算法(用了一個(gè)隊(duì)列來(lái)實(shí)現(xiàn))

       NEXT CHILD
        }
        return $files; // end of tree, file not found
      }
      function profile($func, $trydir)
      {
        $mem1 = memory_get_usage();
        echo '
      ----------------------- Test run for '.$func.'() ';
        flush();
        $time_start = microtime(true);
        $list = $func($trydir);
        //print_r($list);
        $time = microtime(true) - $time_start;
        echo 'Finished : '.count($list).' files
      ';   $mem2 = memory_get_peak_usage();   printf('
      Max memory for '.$func.'() : %0.2f kbytes Running time for '.$func.'() : %0.f s
      ',   ($mem2-$mem1)/1024.0, $time);   return $list; } profile('breadth_first_files', "D:\www\server"); ?>

      以上是“php遍歷樹(shù)的常用方法有哪些”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


      新聞標(biāo)題:php遍歷樹(shù)的常用方法有哪些-創(chuàng)新互聯(lián)
      文章位置:http://www.ef60e0e.cn/article/dshdeo.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        南通市| 台北县| 赫章县| 靖安县| 永春县| 黄石市| 东台市| 东宁县| 鹤壁市| 成武县| 贵定县| 延边| 乌拉特中旗| 安宁市| 宜昌市| 洛南县| 龙海市| 政和县| 板桥市| 岳西县| 明水县| 辽阳县| 凤阳县| 溆浦县| 峡江县| 龙陵县| 长治市| 泽库县| 礼泉县| 西乡县| 芜湖县| 来宾市| 西丰县| 青冈县| 长武县| 筠连县| 彰化市| 茌平县| 镇沅| 郯城县| 界首市|