The Stack class advantage over the array_push and array_pop function is Stack::pop() pops the stack and returns a reference to the popped element. There is also a top function that returns a reference to the top element.
Some sites that implement screen oriented tasks consist of a set of pages organized in the form of a tree hierarchy.
For instance, the user starts at screen A which has some buttons that may open screens B or C. When the screen B is opened, the associated task has to be completed or canceled before the user is allowed to return to screen A. Screen B in itself can also have buttons that open screens D and E, and so on.
In each situation, a stack describes the structure of screens that have to be completed. This class can be used to implement stacks of screens that define the navigation of pages that the users of a Web application must follow. The stack is defined by the URLs of the pages.
This is a simple class that implements a FIFO stack (First In First Out) of values.
It uses arrays to queue values of any type at the end of the queue.
The class can also pop values from the stack by the same order they were queued. It may also return the value at the head of the queue without removing it.
This class provides API to manipulate a stack using two dimensional arrays.
It provides functions for:
- Push an element
- Pop an element
- Retrieve the element at the top of the stack without removing it
- Retrieve the size of the stack
- Determine whether the stack is empty
Get information about the current execution script
This package can be used to retrieve information about the current PHP script execution point.
It can retrieve information about the call stack including all the classes, functions, parameters that were used to reach the current point of the code that PHP is executing.
This is a simple class that implements a LIFO stack (Last In First Out) of values.
It uses arrays to push values of any type on the top of the stack.
The class can also pop values from the stack by the reverse order they were pushed. It may also return the value at the top of the stack without removing it.
This class can be used to manage a LIFO stack (Last In First Out) of values like in the Postscript language.
It implements most of the Postscript stack operations except for mark and cleartomark.
The class can push and pop values from the stack, get the value at the top of the stack or at a given position, get the count of values, exchange the position of two values, duplicate the value at the top of the stack, roll the stack values by a given number of positions.