PHPackages                             tinyphporg/tinyphp-framework-1.0 - 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. [Framework](/categories/framework)
4. /
5. tinyphporg/tinyphp-framework-1.0

ActiveProject[Framework](/categories/framework)

tinyphporg/tinyphp-framework-1.0
================================

A framework for php

1.0.0(3y ago)235Apache-2.0PHPPHP &gt;= 7.0.0

Since Sep 22Pushed 2w ago1 watchersCompare

[ Source](https://github.com/aigameism/tinyphp-framework-1.0)[ Packagist](https://packagist.org/packages/tinyphporg/tinyphp-framework-1.0)[ RSS](/packages/tinyphporg-tinyphp-framework-10/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

TinyPHP Framework 1.0
=====================

[](#tinyphp-framework-10)

中文
--

[](#中文)

### 简介

[](#简介)

一款经过生产环境检验（日 PV 十亿级）的轻量级 PHP 框架，v1.0.1 版本，高性能毫秒级响应。

```
# 支持 Web 和 Console 两种模式，单文件入口，自动识别 Web / CLI 环境
php index.php
```

支持 Console 环境下的 Daemon 守护进程模式（主要适用于 Linux CentOS 7）：

```
# 实现经典的 Master-Worker 模式
php index.php --id=tinyphp-daemon --daemon=start

# 可扩展为 TCP 服务端程序、定时器、IO 异步事件驱动等，365x24 稳定运行
```

支持一键打包成单文件可执行程序：

```
# 编译
php index.php --build

# 运行生成的 phar 单文件程序
php tinyphp-demo.phar
```

### 框架安装

[](#框架安装)

```
git clone https://github.com/aigmlab/tinyphp.git
cd tinyphp

# 兼容 Composer 安装
composer install aigm/tinyphp-framework-1.0 @dev

# 直接 Git 下载
mkdir lib/ && cd lib
git clone https://github.com/aigmlab/tinyphp.git

# 运行
php index.php

# 编译
php index.php --build

# 开启守护进程
php index.php -d

# 编辑配置文件
vi application/config/profile.php
```

### 一键搭建 LNMP 运行环境

[](#一键搭建-lnmp-运行环境)

#### lnmp-utils

[](#lnmp-utils)

Linux (CentOS 7 X64) + OpenResty (Nginx) + MySQL + PHP + Redis 一键安装包。

项目地址:

#### CentOS 7 X86\_64 (生产环境)

[](#centos-7-x86_64-生产环境)

```
git clone https://github.com/aigmlab/lnmp-utils.git
cd ./lnmp-utils
./install.sh -m lnmp
curl http://127.0.0.1
```

### 框架开发规范

[](#框架开发规范)

#### 一、PHP 编码规范

[](#一php-编码规范)

- [第一章 文件结构](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/001%E6%96%87%E4%BB%B6%E7%BB%93%E6%9E%84.md)
- [第二章 程序的排版](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/002%E7%A8%8B%E5%BA%8F%E7%9A%84%E6%8E%92%E7%89%88.md)
- [第三章 命名规则](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/003%E5%91%BD%E5%90%8D%E8%A7%84%E5%88%99.md)
- [第四章 表达式和基本语句](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/004%E8%A1%A8%E8%BE%BE%E5%BC%8F%E5%92%8C%E5%9F%BA%E6%9C%AC%E8%AF%AD%E5%8F%A5.md)
- [第五章 常量](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/005%E5%B8%B8%E9%87%8F.md)
- [第六章 函数设计](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/006%E5%87%BD%E6%95%B0%E8%AE%BE%E8%AE%A1.md)
- [第七章 IDE 的选择](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/007IDE%E7%9A%84%E9%80%89%E6%8B%A9.md)
- [第八章 编码规范示例](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/001-%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83/008%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83%E7%9A%84%E4%B8%80%E4%BA%9B%E7%A4%BA%E4%BE%8B.md)

#### 二、SQL 使用规范

[](#二sql-使用规范)

- [第一章 查询规范](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/002-SQL%E8%A7%84%E8%8C%83/001%E6%9F%A5%E8%AF%A2%E8%AF%AD%E5%8F%A5.md)
- [第二章 库和表的规范](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/002-SQL%E8%A7%84%E8%8C%83/002%E5%BA%93%E5%92%8C%E8%A1%A8%E7%9A%84%E8%A7%84%E8%8C%83.md)
- [第三章 数据库设计原则](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/002-SQL%E8%A7%84%E8%8C%83/003%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E5%8E%9F%E5%88%99.md)
- [第四章 数据库优化原则](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/docs/002-SQL%E8%A7%84%E8%8C%83/004%E6%95%B0%E6%8D%AE%E5%BA%93%E4%BC%98%E5%8C%96%E5%8E%9F%E5%88%99.md)

#### 三、框架使用手册

[](#三框架使用手册)

- [第一章 框架入门](https://github.com/aigmlab/tinyphp-framework-1.0/blob/master/manual/001%E6%A1%86%E6%9E%B6%E5%85%A5%E9%97%A8.md)

---

English
-------

[](#english)

### Overview

[](#overview)

A production-tested (1+ billion daily PV), lightweight PHP framework — v1.0.1, high-performance with millisecond response times.

```
# Supports both Web and Console modes via a single entry point
php index.php
```

Daemon mode for Console environments (primarily Linux CentOS 7):

```
# Classic Master-Worker pattern
php index.php --id=tinyphp-daemon --daemon=start

# Extensible to TCP servers, timers, async IO event-driven modes — 365x24 stable
```

Single-file executable packaging:

```
# Build
php index.php --build

# Run the generated phar executable
php tinyphp-demo.phar
```

### Installation

[](#installation)

```
git clone https://github.com/aigmlab/tinyphp.git
cd tinyphp

# Composer install
composer install aigm/tinyphp-framework-1.0 @dev

# Or direct Git clone
mkdir lib/ && cd lib
git clone https://github.com/aigmlab/tinyphp.git

# Run
php index.php

# Build
php index.php --build

# Start daemon
php index.php -d

# Edit config
vi application/config/profile.php
```

### LNMP Environment Setup

[](#lnmp-environment-setup)

#### lnmp-utils

[](#lnmp-utils-1)

Linux (CentOS 7 X64) + OpenResty (Nginx) + MySQL + PHP + Redis one-click installer.

Repository:

#### CentOS 7 X86\_64 (Production)

[](#centos-7-x86_64-production)

```
git clone https://github.com/aigmlab/lnmp-utils.git
cd ./lnmp-utils
./install.sh -m lnmp
curl http://127.0.0.1
```

### Coding Standards

[](#coding-standards)

The framework includes comprehensive documentation covering:

- PHP coding standards (file structure, formatting, naming, expressions, constants, function design)
- SQL usage guidelines (query standards, table/database conventions, design and optimization principles)
- Framework manual and getting-started guide

See the [中文](#%E4%B8%AD%E6%96%87) section above for the complete document index.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance63

Regular maintenance activity

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1380d ago

### Community

Maintainers

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

---

Top Contributors

[![aigameism](https://avatars.githubusercontent.com/u/5679933?v=4)](https://github.com/aigameism "aigameism (8 commits)")[![aigamelab](https://avatars.githubusercontent.com/u/5679933?v=4)](https://github.com/aigamelab "aigamelab (8 commits)")

### Embed Badge

![Health badge](/badges/tinyphporg-tinyphp-framework-10/health.svg)

```
[![Health](https://phpackages.com/badges/tinyphporg-tinyphp-framework-10/health.svg)](https://phpackages.com/packages/tinyphporg-tinyphp-framework-10)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M300](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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