finds.dev← search

// the find

laruence/yaf

★ 4,515 · C · NOASSERTION · updated Aug 2025

Fast php framework written in c, built in php extension

Yaf is a PHP MVC framework implemented as a C extension, meaning the router, dispatcher, controller base classes, and autoloader all live in compiled C code rather than PHP userland. The performance gain is real — less PHP bytecode executed per request — but you're trading portability and hackability for that speed. It's aimed at PHP shops that need Zend Framework-style structure without the overhead.

The C implementation genuinely moves work out of the PHP runtime: routing, dispatch, and autoloading happen in compiled code, which matters at scale under a traditional PHP-FPM setup. The test suite is thorough — 110+ numbered .phpt files plus dedicated regression tests for specific bug numbers, which is more disciplined than most PHP framework projects. The framework surface is small and explicit: controllers, models, views, plugins, and a bootstrap — no magic, no service container complexity. It has an official PECL release and ships stub files and arginfo headers, so IDE completion and PHP 8 named-argument support work properly.

Being a C extension makes the operational story painful: you need to compile or install the PECL extension on every environment, which rules out most shared hosting and complicates Docker images. There's no dependency injection container, no middleware pipeline, and no event system — you get MVC structure and routing, and you build everything else yourself or bolt on libraries that weren't designed with Yaf in mind. The documentation lives on php.net and hasn't been meaningfully updated in years; the README points to the manual as if that's sufficient, but large swaths of behavior (plugin hooks, dispatcher internals) are documented only by reading the C source or the IDE stubs. PHP 7 is still listed as the minimum requirement, which tells you the project's target audience is running legacy infrastructure, not greenfield work.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →