Does PHP have built-in data structures?

后端 未结 14 726
名媛妹妹
名媛妹妹 2021-01-30 00:18

I\'m looking at the PHP Manual, and I\'m not seeing a section on data structures that most languages have, such as lists and sets. Am I just blind or does PHP not have anything

14条回答
  •  醉话见心
    2021-01-30 00:47

    The only native data structure in PHP is array. Fortunately, arrays are quite flexible and can be used as hash tables as well.

    http://www.php.net/array

    However, there is SPL which is sort of a clone of C++ STL.

    http://www.php.net/manual/en/book.spl.php

提交回复
热议问题