pop() public method

Pops up the item at the top of the stack.
public pop ( ) : mixed
return mixed the item at the top of the stack
Exemplo n.º 1
0
 public function testCanNotPopAnEmptyStack()
 {
     $stack = new TStack();
     try {
         $item = $stack->pop();
     } catch (TInvalidOperationException $e) {
         return;
     }
     self::fail('An expected TInvalidOperationException was not raised');
 }