peek() 공개 메소드

Unlike {@link pop()}, this method does not remove the item from the stack.
public peek ( ) : mixed
리턴 mixed item at the top of the stack
예제 #1
0
 public function testCanNotPeekAnEmptyStack()
 {
     $stack = new TStack();
     try {
         $item = $stack->peek();
     } catch (TInvalidOperationException $e) {
         return;
     }
     self::fail('An expected TInvalidOperationException was not raised');
 }