PHPackages                             laruence/yaf - 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. laruence/yaf

ActivePhp-ext

laruence/yaf
============

Fast php framework written in c, built in php extension

4.5k01.4k[97 issues](https://github.com/laruence/yaf/issues)[2 PRs](https://github.com/laruence/yaf/pulls)CCI passing

Since Aug 1Pushed today438 watchersCompare

[ Source](https://github.com/laruence/yaf)[ Packagist](https://packagist.org/packages/laruence/yaf)[ RSS](/packages/laruence-yaf/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Yaf - Yet Another Framework
===========================

[](#yaf---yet-another-framework)

[![Build status](https://camo.githubusercontent.com/233a071a0af764ba392a25c14fcea0f3a3800f7af79b0afff93e7d032ae42908/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f61776969367766326f636d79323032702f6272616e63682f6d61737465723f7376673d74727565)](https://ci.appveyor.com/project/laruence/yaf/branch/master) [![Build Status](https://github.com/laruence/yaf/workflows/integrate/badge.svg)](https://github.com/laruence/yaf/actions?query=workflow%3Aintegrate)

Yaf is a PHP framework with high performance. It is written in C and built as a PHP extension.

Requirement
-----------

[](#requirement)

- PHP 7.0+ (master branch)
- PHP 5.2+ ([php5 branch](https://github.com/laruence/yaf/tree/php5))

Install
-------

[](#install)

### Install via PECL

[](#install-via-pecl)

Yaf is a PECL extension, which means you can simply install it by:

```
$ pecl install yaf
```

### Compile from source

[](#compile-from-source)

```
$ /path/to/phpize
$ ./configure --with-php-config=/path/to/php-config
$ make && make install
```

Documentation
-------------

[](#documentation)

Yaf manual can be found at:

For IDE
-------

[](#for-ide)

A documented prototype script can be found at:

Tutorial
--------

[](#tutorial)

### Application Directory Layout

[](#application-directory-layout)

A classic application directory layout is:

```
- .htaccess  # Rewrite rules
+ public
  | - index.php  # Application entry
  | + css
  | + js
  | + img
+ conf
  | - application.ini  # Configuration
- application/
  - Bootstrap.php  # Bootstrap
  + controllers
     - Index.php  # Default controller
  + views
     |+ index
        - index.phtml  # View template for default controller
  + library  # Libraries
  + models   # Models
  + plugins  # Plugins

```

### DocumentRoot

[](#documentroot)

Set `DocumentRoot` to `application/public`, so only the public folder is accessible from the web.

### index.php

[](#indexphp)

`index.php` in the public directory is the only way into the application. You should rewrite all requests to it (using `.htaccess` in Apache + mod\_php, or the equivalent in your web server).

```

```

Run the Application
-------------------

[](#run-the-application)

Point your browser to your configured domain (e.g. `http://www.example.com`) and you should see "Hello World".

Code Generator
--------------

[](#code-generator)

You can generate the example above using Yaf Code Generator:

```
$ ./yaf_cg -d output_directory [-a application_name] [--namespace]
```

The code generator is located at:

More
----

[](#more)

More info can be found at the Yaf Manual:

License
-------

[](#license)

[PHP-3.01](https://www.php.net/license/3_01.txt)

###  Health Score

36

↑

LowBetter than 79% of packages

Maintenance65

Regular maintenance activity

Popularity33

Limited adoption so far

Community41

Growing community involvement

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 89.2% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/df6188ed794ac976773365c960940d1eccb9673d8fcf63a7b1bc8b6108f01a56?d=identicon)[laruence](/maintainers/laruence)

---

Top Contributors

[![laruence](https://avatars.githubusercontent.com/u/382813?v=4)](https://github.com/laruence "laruence (903 commits)")[![defender-11](https://avatars.githubusercontent.com/u/68848745?v=4)](https://github.com/defender-11 "defender-11 (21 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (20 commits)")[![wenjun1055](https://avatars.githubusercontent.com/u/1732544?v=4)](https://github.com/wenjun1055 "wenjun1055 (12 commits)")[![xinhaiz](https://avatars.githubusercontent.com/u/5226315?v=4)](https://github.com/xinhaiz "xinhaiz (12 commits)")[![elad-yosifon](https://avatars.githubusercontent.com/u/2989684?v=4)](https://github.com/elad-yosifon "elad-yosifon (6 commits)")[![zxcvdavid](https://avatars.githubusercontent.com/u/1303201?v=4)](https://github.com/zxcvdavid "zxcvdavid (5 commits)")[![springleng](https://avatars.githubusercontent.com/u/1900972?v=4)](https://github.com/springleng "springleng (4 commits)")[![yulonghu](https://avatars.githubusercontent.com/u/2120559?v=4)](https://github.com/yulonghu "yulonghu (4 commits)")[![fruit](https://avatars.githubusercontent.com/u/62828?v=4)](https://github.com/fruit "fruit (4 commits)")[![netroby](https://avatars.githubusercontent.com/u/154278046?v=4)](https://github.com/netroby "netroby (2 commits)")[![skaic](https://avatars.githubusercontent.com/u/1109154?v=4)](https://github.com/skaic "skaic (2 commits)")[![yinggaozhen](https://avatars.githubusercontent.com/u/13899619?v=4)](https://github.com/yinggaozhen "yinggaozhen (2 commits)")[![villfa](https://avatars.githubusercontent.com/u/2891564?v=4)](https://github.com/villfa "villfa (1 commits)")[![xiaohuochan](https://avatars.githubusercontent.com/u/7743777?v=4)](https://github.com/xiaohuochan "xiaohuochan (1 commits)")[![recoye](https://avatars.githubusercontent.com/u/491639?v=4)](https://github.com/recoye "recoye (1 commits)")[![abenevaut](https://avatars.githubusercontent.com/u/1134021?v=4)](https://github.com/abenevaut "abenevaut (1 commits)")[![anvyzhang](https://avatars.githubusercontent.com/u/913958?v=4)](https://github.com/anvyzhang "anvyzhang (1 commits)")[![cmb69](https://avatars.githubusercontent.com/u/2306138?v=4)](https://github.com/cmb69 "cmb69 (1 commits)")[![DigDeeply](https://avatars.githubusercontent.com/u/1439346?v=4)](https://github.com/DigDeeply "DigDeeply (1 commits)")

---

Tags

cphpphp-frameworkyaf

### Embed Badge

![Health badge](/badges/laruence-yaf/health.svg)

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

PHPackages © 2026

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