Skip to content
Related Articles

Related Articles

PHP Ds\Sequence Functions Complete Reference

View Discussion
Improve Article
Save Article
  • Last Updated : 21 Mar, 2022

A Sequence is used to arrange the values in a single and linear dimension way. In some languages, the sequence refers to the List. The sequence is similar to the array which is used as incremental integer keys are listed below:

  • The index value of the sequence are [0, 1, 2, …, size – 1], where size represents the size of the array.
  • The sequence elements are accessed by using index value so it allows to access values by index in the range [0, size – 1].
  • The DS\Sequence is the efficient Data Structure in PHP 7. It is an alternative of the array.

Requirements: PHP 7 is required for both extension and the compatibility polyfill.

Installation: The easiest way to install data structure by using PECL extension.

pecl install ds

The complete list of data structure DS\Sequence are given below:


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!