Ds\Stack::peekReturns the value at the top of the stack. Description
public mixed Ds\Stack::peek
( void
)
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
<?php The above example will output something similar to: string(1) "c" |