O
O
Optimus2018-02-25 23:03:31
PHP
Optimus, 2018-02-25 23:03:31

Are there examples of stack and queue in PHP?

Arrays in PHP are hash tables, and apart from arrays of other elements of the "list" type, I don’t remember anything.
Is there any function based on the stack for example? Or a queue, so that with an increase in the number of elements, the difference with the stack becomes noticeable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artemio Vegas, 2018-02-26
Pyan @marrk2

If you use php7 then a good implementation of data structures as an extension is php.net/manual/en/book.ds.php Better
implemented than SPL.
Article about this https://medium.com/@rtheunissen/efficient-data-str...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question