Gene

C Extension Core · Built for Peak Throughput

Stronger core-path performance than Hyperf

Routing, dispatch, and hot paths run in the C extension with zero-heap optimizations. In typical HTTP API benchmarks, Gene cuts per-request overhead versus pure PHP coroutine stacks and raises the QPS ceiling.

C extension · zero-heap hot path · FPM & Swoole ready

latest version: V6.0.0 (Apr 05, 2026 update)

Why stronger performance than Hyperf?

Hyperf delivers a mature pure-PHP coroutine ecosystem. Gene moves the most expensive userland PHP overhead into a C extension — built for server workloads where latency and throughput must be pushed to the limit.

Gene

  • Core routing, factory, and config hot paths in C — shorter dispatch chain
  • Zero-heap memory strategies tuned for high-concurrency benchmarks
  • PHP-FPM and Swoole long-running modes, low footprint, stable uptime

Hyperf (comparison)

  • Mature coroutine stack and component ecosystem in pure PHP
  • Framework logic stays in userland; higher core-path cost than C extensions
  • On equal hardware, peak performance is often decided by the runtime — reproduce on your machine

Results vary with CPU, kernel, PHP/Swoole version, and app code. See our benchmarks and run side-by-side tests locally.

Elegant Fast Flexible Simple C extension framework. Core capabilities:
* Elegant: lightweight SOA with bounded context, composable modules, DDD-friendly;
* Fast: C extension on hot paths; on equal configs, often higher QPS than Laravel, Yii, Hyperf;
* Flexible: classic MVC plus MVCS with a dedicated service layer;
* Simple: one-minute demo to get started;
* Scenarios: web apps, microservices, long-running workers;
* Routing: full HTTP REST support with binary-tree lookup;
* Hooks: global and per-route before/after hooks;
* DI: Spring-inspired IoC with global and local inversion of control;
* Middleware: AOP-style registration via config;
* Factory: powerful singleton factory;
* Database: high-performance PDO ORM for MySQL, MariaDB, PostgreSQL, SQLite;
* Config: process-cached config with auto refresh;
* Validation: built-in and custom validation rules;
* Views: compiled template engine or native PHP templates;
* Long connections: per-process MySQL/Redis/Memcached with reconnect detection;
* CLI: infrastructure for console apps and daemons;
* Cache: timed method cache plus real-time version cache;
* Autoload: PSR-4 with custom library paths;
* Swoole: low memory usage, no leaks in long-running mode;
* Other: Composer support;
Release History