PHPackages                             vairogs/functions-queue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. vairogs/functions-queue

Abandoned → [valksor/php-functions-queue](/?search=valksor%2Fphp-functions-queue)Library[Queues &amp; Workers](/categories/queues)

vairogs/functions-queue
=======================

A PHP library providing a simple and efficient queue implementation for managing collections of items in a FIFO (First-In-First-Out) manner

00PHP

Since May 24Pushed 11mo agoCompare

[ Source](https://github.com/vairogs/functions-queue)[ Packagist](https://packagist.org/packages/vairogs/functions-queue)[ RSS](/packages/vairogs-functions-queue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Vairogs Functions: Queue
========================

[](#vairogs-functions-queue)

A PHP library providing a simple and efficient queue implementation for managing collections of items in a FIFO (First-In-First-Out) manner.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require vairogs/functions-queue
```

Requirements
------------

[](#requirements)

PHP 8.4 or higher

Usage
-----

[](#usage)

The Queue class provides a simple implementation of a FIFO (First-In-First-Out) queue data structure.

```
use Vairogs\Functions\Queue\Queue;

// Create a new Queue instance
$queue = new Queue();

// Add items to the queue
$queue->push(1);
$queue->push(2);
$queue->push(3);

// Check if the queue contains an item
$containsTwo = $queue->contains(2); // true

// Get the number of items in the queue
$count = count($queue); // 3

// Check if the queue is empty
$isEmpty = $queue->isEmpty(); // false

// Get the first item without removing it
$firstItem = $queue->peek(); // 1

// Remove and return the first item
$firstItem = $queue->pop(); // 1

// Clear all items from the queue
$queue->clear();
```

You can also initialize a queue with an array of items:

```
// Create a queue with initial items
$queue = new Queue([1, 2, 3]);

// Get the number of items
echo count($queue); // 3
```

Features
--------

[](#features)

For a complete list of all methods available in this package, see [Features](docs/features.md).

License
-------

[](#license)

This package is licensed under the [BSD-3-Clause License](LICENSE).

About Vairogs
-------------

[](#about-vairogs)

This package is part of the [vairogs/vairogs](https://github.com/vairogs/vairogs) project - a comprehensive PHP library and Symfony bundle that provides a collection of utilities, components, and integrations for Symfony applications.

The main project includes:

- Various utility functions and components
- Doctrine ORM tools and extensions
- API Platform integrations
- Symfony bundle for easy configuration
- And much more

If you find this Queue component useful, you might want to check out the full Vairogs project for additional tools and utilities that can enhance your Symfony application development.

To install the complete package:

```
composer require vairogs/vairogs
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c4db85e32518c5a6caa2fd625032a2b016ef42d60cf8a101c165cc5c0048b221?d=identicon)[k0d3r1s](/maintainers/k0d3r1s)

---

Top Contributors

[![k0d3r1s](https://avatars.githubusercontent.com/u/38725938?v=4)](https://github.com/k0d3r1s "k0d3r1s (1 commits)")

### Embed Badge

![Health badge](/badges/vairogs-functions-queue/health.svg)

```
[![Health](https://phpackages.com/badges/vairogs-functions-queue/health.svg)](https://phpackages.com/packages/vairogs-functions-queue)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2228.8M171](/packages/react-async)[react/promise-stream

The missing link between Promise-land and Stream-land for ReactPHP

11512.9M45](/packages/react-promise-stream)[illuminate/bus

The Illuminate Bus package.

6043.8M409](/packages/illuminate-bus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
