PHPackages                             allegro-php/allegro - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. allegro-php/allegro

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

allegro-php/allegro
===================

PHP bindings to the allegro.

0.2.0(2y ago)0371MITCPHP &gt;=8.1

Since Jan 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/AllegroPHP/allegro)[ Packagist](https://packagist.org/packages/allegro-php/allegro)[ RSS](/packages/allegro-php-allegro/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (5)Versions (5)Used By (1)

php-allegro
-----------

[](#php-allegro)

PHP bindings to the [allegro 5](https://liballeg.org/) C library.

**Requirements**

- PHP &gt;= 8.1
- PHP FFI extension available
- allegro 5

**Example:**

```
require __DIR__ . '/vendor/autoload.php';

$allegro = new \AllegroPHP\Allegro\Allegro();

$init = $allegro->al_install_system($allegro->al_get_allegro_version(), function (){});

$display = $allegro->al_create_display(500, 500);
$queue = $allegro->al_create_event_queue();
$timer = $allegro->al_create_timer(1.0 / 60);

$event_queue = $allegro->al_create_event_queue();

$allegro->al_install_keyboard();
$allegro->al_install_joystick();
$allegro->al_install_mouse();

$allegro->al_register_event_source($event_queue, $allegro->al_get_keyboard_event_source());
$allegro->al_register_event_source($event_queue, $allegro->al_get_joystick_event_source());
$allegro->al_register_event_source($event_queue, $allegro->al_get_mouse_event_source());
$allegro->al_register_event_source($event_queue, $allegro->al_get_display_event_source($display));
$allegro->al_register_event_source($event_queue, $allegro->al_get_timer_event_source($timer));

$running = true;
$event = $allegro->new('ALLEGRO_EVENT');
while ($running){
    $allegro->al_wait_for_event($event_queue, \FFI::addr($event));

    if ($event->type === \AllegroPHP\Allegro\Event\Type::DISPLAY_CLOSE) {
        $running = false;
    }
}

$allegro->al_destroy_display($display);
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~360 days

Total

4

Last Release

925d ago

PHP version history (2 changes)0.1.1PHP &gt;=8.0

0.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13917602?v=4)[Dima](/maintainers/kmaestro)[@kmaestro](https://github.com/kmaestro)

---

Top Contributors

[![kmaestro](https://avatars.githubusercontent.com/u/13917602?v=4)](https://github.com/kmaestro "kmaestro (12 commits)")

---

Tags

phpuiffigraphicallegro3d2d

### Embed Badge

![Health badge](/badges/allegro-php-allegro/health.svg)

```
[![Health](https://phpackages.com/badges/allegro-php-allegro/health.svg)](https://phpackages.com/packages/allegro-php-allegro)
```

###  Alternatives

[illuminate/contracts

The Illuminate Contracts package.

706130.3M13.3k](/packages/illuminate-contracts)[florianv/exchanger

PHP exchange rate provider layer for currency conversion: 30+ services, chain fallback, and caching.

1865.0M20](/packages/florianv-exchanger)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k42](/packages/civicrm-civicrm-core)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

378604.0k102](/packages/flow-php-etl)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.8M12](/packages/gehrisandro-tailwind-merge-php)[serafim/ffi-sdl

SDL FFI bindings for the PHP language

324.6k3](/packages/serafim-ffi-sdl)

PHPackages © 2026

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