Introduction
The Yet Another Framework
(Yaf) extension is a PHP framework that is used to
develop web applications.
Unlike typical PHP frameworks, Yaf is written in C and compiled as an
extension: the framework classes, the autoloader, the router and the
dispatch loop all run in compiled code, so the per-request framework
overhead is measured in microseconds rather than milliseconds, and there
are no framework PHP files to load. It is designed for high-traffic
applications where bootstrap cost matters, and for long-lived service
runtimes (such as Swoole) where each request needs a clean dispatch
cycle.
Yaf implements the classical MVC architecture with a
single entry script, a configuration file with environment sections,
bootstrap hooks, a plugin system with seven dispatch hooks, six built-in
route types, a PSR-0 style autoloader
(Yaf_Loader) and a lightweight PHP template view
(Yaf_View_Simple).
A simple Yaf benchmark can be found at
» Yaf Performance. For a
quick start guide, please refer to the
Tutorials section.
Note:
Yaf requires PHP 7.0 or newer (the master branch of its source
repository); a php5 branch supports PHP 5.2 and newer.