PHP是否具有内置的数据结构? [英] Does PHP have built-in data structures?

查看:85
本文介绍了PHP是否具有内置的数据结构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看 PHP手册,我没有看到一个部分大多数语言具有的数据结构,如列表和集合。我只是盲目的,还是PHP没有这样的内置东西?

解决方案

PHP中唯一的本机数据结构是数组。幸运的是,数组是非常灵活的,也可以用作哈希表。



http://www.php.net/array



但是,有一个是C ++ STL克隆的SPL。 / p>

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


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 like this built in?

解决方案

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

这篇关于PHP是否具有内置的数据结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆