Built-in PHP features for data structure

PHP has a rich collection of built-in data structures in Standard PHP Library SPL. After the release of PHP 7, it is believed that SPL data structure implementation is not very "performant" as compared to the old PHP version. So, we will discuss a new PECL extension just designed for data structures. We also have a very strong support for PHP array, which can be used as a set, vector, map, hash table, stack, queue, collection, dictionary, and so on. SPL is fairly new compared to the array and still managed to capture the limelight with the diverse implementation of core data structures as a built-in feature. Since PHP 5.0, SPL is shipped with core PHP so that no extra extension or build is required. We have already explored the dynamic nature of PHP array in Chapter 2, Understanding PHP Arrays. In this chapter, we will name few of the other useful functions available to PHP to operate on data structures.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset