function QueueInterface::element
Retrieves, but does not remove, the head of this queue.
This method differs from `peek()` only in that it throws an exception if this queue is empty.
Return value
T the head of this queue.
Throws
NoSuchElementException if this queue is empty.
See also
1 method overrides QueueInterface::element()
- Queue::element in vendor/
ramsey/ collection/ src/ Queue.php
File
-
vendor/
ramsey/ collection/ src/ QueueInterface.php, line 146
Class
- QueueInterface
- A queue is a collection in which the entities in the collection are kept in order.
Namespace
Ramsey\CollectionCode
public function element() : mixed;