Ds\Stack::peekReturns the value at the top of the stack Description
public mixed Ds\Stack::peek()
Returns the value at the top of the stack, but does not remove it. ParametersThis function has no parameters. Return ValuesThe value at the top of the stack. Errors/ExceptionsUnderflowException if empty. ExamplesExample #1 Ds\Stack::peek example
The above example will output something similar to: string(1) "c" |