This is an easy to use PHP Stack class that makes it easy to use stacks in PHP. Stacks use a last in first out technique. This class will work in PHP 5.x. The source code for the PHP Stack class can be viewed below (CollectionStack.php). Here is an example of how to use the Stack class: // start a new stack
$s = new CollectionStack();

// empty the entire stack
$s->clear(); // now stack is emptyA stack can be set with items with first starting the stack: // start new stack with items
$s = new CollectionStack(array(
'one',
'two',
'three'
));