PHP--SPL擴充學習筆記

來源:互聯網
上載者:User

標籤:

    一. SPL是幹嘛的        SPL是用於解決典型問題(standard problems)的一組介面與類的集合。                 資料結構:          1.實現雙向列表          SplDoublyLinkedList implements Iterator , ArrayAccess , Countable {}                     2.棧(Stack)是一種特殊的線性表,因為它只能線上性表的一端進行插入或刪除元素(即進棧和出棧)          SplStack extends SplDoublyLinkedList implements Iterator , ArrayAccess , Countable {}                    3.隊列(SplQueue) 就像我們生活中排隊一樣,和棧一樣,它的特性是先進先出(FIFO)。          SplQueue extends SplDoublyLinkedList implements Iterator , ArrayAccess , Countable {}           4.優先隊列SplPriorityQueue是基於堆(後文介紹)實現的。          SplPriorityQueue implements Iterator , Countable {}                    5.堆(Heap)就是為了實現優先隊列SplPriorityQueue而設計的一種資料結構,它是通過構造二元堆積(二叉樹的一種)實現。           abstract SplHeap implements Iterator , Countable {}          6.陣列 處理巨大數量的固定長度數組是採用              SplFixedArray implements Iterator , ArrayAccess , Countable {}               7.映射  用來儲存一組對象的,特別是當你需要唯一標識對象的時候。             SplObjectStorage implements Countable , Iterator , Serializable , ArrayAccess {}  

 

PHP--SPL擴充學習筆記

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.