PHPackages                             xcorp1986/zhttp - 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. xcorp1986/zhttp

ActiveLibrary[Framework](/categories/framework)

xcorp1986/zhttp
===============

a asyn php framework

v1.0(9y ago)06PHP

Since Dec 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/xcorp1986/zhttp)[ Packagist](https://packagist.org/packages/xcorp1986/zhttp)[ RSS](/packages/xcorp1986-zhttp/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

zhttp-用来做http web服务的异步非阻塞轻量级框架
==============================

[](#zhttp-用来做http-web服务的异步非阻塞轻量级框架)

### 开发交流群:384013097

[](#开发交流群384013097)

新手入门项目，附有源码和线上实例（主要用于介绍）
------------------------

[](#新手入门项目附有源码和线上实例主要用于介绍)

最新框架依赖环境docker镜像已经发布,拉取方法(内置mongodb扩展、memcached扩展、swoole扩展1.9包括异步redis)

```
docker pull keaixiaou/zhttp:1.0

```

使用手册（待完善）
---------

[](#使用手册待完善)

协议
--

[](#协议)

MIT license

优势
--

[](#优势)

```
1.框架基于swoole开发，并且一些IO操作底层已经封装为异步，性能极其强悍。
2.框架底层已经封装好异步，内置mysql、redis连接池，只需要在调用的时候在前面加yield，近乎同步的写法，却是异步的调用，并且无需关注底层实现，连接数超等问题，使用非常简单。

```

注意事项
----

[](#注意事项)

```
1.框架最新加入协程+mysql连接池，非阻塞的mysql查询大大提高了框架应对请求的吞吐量
2.php版本需要7.0+
3.swoole版本1.8.*
4.如果用到异步redis，需要安装hiredis，安装教程:http://wiki.swoole.com/wiki/page/p-redis.html

```

安装依赖包
-----

[](#安装依赖包)

```
composer install
1.没有安装composer的先安装composer
2.不会composer或者不喜欢composer的可以直接去我另一个资源库下载框架依赖,地址：https://github.com/keaixiaou/zphp

```

运行zhttp
-------

[](#运行zhttp)

```
本框架只支持http模式：
运行：
cd 到根目录
php webroot/main.php start|stop|restart|reload|status
访问IP:PORT
建议：
    如果是静态文件如css、js、image，可以直接用nginx代理
    如果是动态请求，最好使用nginx做代理转发

```

### 服务监控图

[](#服务监控图)

[![服务监控](https://raw.githubusercontent.com/keaixiaou/base/master/status.jpeg)](https://raw.githubusercontent.com/keaixiaou/base/master/status.jpeg)

[![本机裸跑输出](https://raw.githubusercontent.com/keaixiaou/base/master/mongo.jpeg)](https://raw.githubusercontent.com/keaixiaou/base/master/mongo.jpeg)

ab测试（配置：MacBook Air 8G内存，双核，I5）
-------------------------------

[](#ab测试配置macbook-air-8g内存双核i5)

### 本机裸跑输出

[](#本机裸跑输出)

[![本机裸跑输出](https://raw.githubusercontent.com/keaixiaou/base/master/%E8%A3%B8%E8%B7%91%E6%B5%8B%E8%AF%95.png)](https://raw.githubusercontent.com/keaixiaou/base/master/%E8%A3%B8%E8%B7%91%E6%B5%8B%E8%AF%95.png)

### redis测试，2个work

[](#redis测试2个work)

[![redis测试](https://raw.githubusercontent.com/keaixiaou/base/master/api%E6%B5%8B%E8%AF%95.png)](https://raw.githubusercontent.com/keaixiaou/base/master/api%E6%B5%8B%E8%AF%95.png)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3425d ago

### Community

Maintainers

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

---

Top Contributors

[![keaixiaou](https://avatars.githubusercontent.com/u/13299190?v=4)](https://github.com/keaixiaou "keaixiaou (43 commits)")

### Embed Badge

![Health badge](/badges/xcorp1986-zhttp/health.svg)

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

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

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

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

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