phasync
QueueInterface / tryPeek

Method

QueueInterface::tryPeek

Copies the first value of the queue into $value, without removing it, and returns whether there was one.

Description#

public QueueInterface::tryPeek(
    mixed &$value
): bool

Parameters#

$value mixed

Return values#

False if the queue was empty bool

See also#