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. allegro-php/allegro

ActiveLibrary

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 today

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 37% 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

870d ago

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

0.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f67b666a9c44dbd2ebe3910b013ad39ebe4b11e9c8a9d04fa6efb4c75eaa28d1?d=identicon)[kmaestro](/maintainers/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

[gehrisandro/tailwind-merge-php

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

1391.5M9](/packages/gehrisandro-tailwind-merge-php)[redchamps/module-clean-admin-menu

It will merge all third party extensions menu items to single menu item named 'Extensions'.

164416.3k](/packages/redchamps-module-clean-admin-menu)[serafim/ffi-sdl

SDL FFI bindings for the PHP language

324.6k3](/packages/serafim-ffi-sdl)[rockys/ex-admin-thinkphp

Ex-admin-thinkphp 是一个基于Ant Design of Vue + Thinkphp 开发而成后台系统构建工具，无需关注页面模板JavaScript，只用php代码即可快速构建出一个功能完善的后台系统。

163.0k](/packages/rockys-ex-admin-thinkphp)

PHPackages © 2026

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