PHPackages                             stag/piha - 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. stag/piha

ActiveLibrary

stag/piha
=========

Piha php micro framework

25PHP

Since Aug 15Pushed 2y ago3 watchersCompare

[ Source](https://github.com/StagnantIce/piha-framework)[ Packagist](https://packagist.org/packages/stag/piha)[ RSS](/packages/stag-piha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 Piha - Easy PHP Framework
==========================

[](#-piha---easy-php-framework)

This framework work on PHP 5.3+ or PHP 8.2 and MySQL (Bitrix as optional). As optional you can include this framework as library to your project.

[![](https://camo.githubusercontent.com/14eda0e48aefaf72141f2824156a57ba258e406897435ac0c5cf76e64f3c53e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d37302532352d79656c6c6f77677265656e2e737667)](https://camo.githubusercontent.com/14eda0e48aefaf72141f2824156a57ba258e406897435ac0c5cf76e64f3c53e9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d37302532352d79656c6c6f77677265656e2e737667)

[![](https://camo.githubusercontent.com/da26f515bbf9bb7919cedbca0c52916b71586350e72e7492557b8abf859b5812/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d352e332d626c75652e737667)](https://camo.githubusercontent.com/da26f515bbf9bb7919cedbca0c52916b71586350e72e7492557b8abf859b5812/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d352e332d626c75652e737667)

[![](https://camo.githubusercontent.com/a9c49f9c822f6bcf69945b1a1d96f03c44f78bc1cea0b35ec6f5125fb2d9cc7b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e332d626c75652e737667)](https://camo.githubusercontent.com/a9c49f9c822f6bcf69945b1a1d96f03c44f78bc1cea0b35ec6f5125fb2d9cc7b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e332d626c75652e737667)

[![](https://camo.githubusercontent.com/4f1d2a7c4251dad685b14d43dedaa34bffe5e989fc3aba473ee8e7f33c17d084/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322d626c75652e737667)](https://camo.githubusercontent.com/4f1d2a7c4251dad685b14d43dedaa34bffe5e989fc3aba473ee8e7f33c17d084/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322d626c75652e737667)

 Fast start
------------

[](#-fast-start-)

1. Clone to directory mysite/piha like install path.
2. Run sudo chown -R www-data:www-data mysite if need, because we need right to create assets directory.

For apache2 ypu can set it in /etc/apache2/envvars

export APACHE\_RUN\_USER=www-data export APACHE\_RUN\_GROUP=www-data

For php sessions:

chown -R www-data:www-data /var/lib/php/sessions

3. Run mysite/piha/demo.sh and open mysite like your site.

 Features
----------

[](#-features-)

1) Own fast and simple ORM and SQL builder. With many features. ```
$q = new CQuery("tableName", ["ID", "NAME", "CODE"]);
$q->all("ID", "CODE"); // group by CODE

class MyModel {
    public $_name = 'tableName';
    public $_columns = [
      "ID" => ["type"=>"pk"],
      "NAME" => ["type"=>"string"],
      "CODE" => ["type" =>"string"]
    ]
}

MyModel::GetCode(1);
MyModel::q()->where(1)->one("CODE");
MyModel::q()->where(["ID" => 1])->select("ID")->one("CODE"); // equal results

// Simple access
MyModel::q(); //CQuery
MyModel::schema(); // CMigration
MyModel::m(); // CModel
```

2. Simple forms and model forms with autocomplete and html5 support

```
// in controller
$form = CForm::post('MyForm');
if ($form->isSubmit()) {
    echo $form->getValue("DATE_FROM");
}

// in view
echo
$form->start(["action" => $this->url()]),
$form->text(["NAME" => "TITLE"]),
$form->date(["NAME" => "DATE_FROM"]),
$form->submit(["value" => "Search"]),
$form->end();
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/607334e37de77a39d5bc7d1b3014cf58205dc5a8e0282034490b24b193ae55de?d=identicon)[StagnantIce](/maintainers/StagnantIce)

---

Top Contributors

[![StagnantIce](https://avatars.githubusercontent.com/u/1449602?v=4)](https://github.com/StagnantIce "StagnantIce (33 commits)")

### Embed Badge

![Health badge](/badges/stag-piha/health.svg)

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

PHPackages © 2026

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