PHPackages                             cabbagerun/php-stats-sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cabbagerun/php-stats-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cabbagerun/php-stats-sdk
========================

jianzhi stats php sdk

v3.0.5(4y ago)011MITPHP

Since Aug 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/cabbagerun/php-stats-sdk)[ Packagist](https://packagist.org/packages/cabbagerun/php-stats-sdk)[ RSS](/packages/cabbagerun-php-stats-sdk/feed)WikiDiscussions master Synced 3d ago

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

Jianzhi php-stats-sdk
=====================

[](#jianzhi-php-stats-sdk)

- php: ^7.1
- ext-swoole: ^4.x
- ext-curl: \*
- ext-json: \*

安装
--

[](#安装)

- composer require jianzhi/php-stats-sdk

结构
--

[](#结构)

```
├── Analytics               数据采集
├── ClickHouse              ClickHouse封装
├── Common                  公共类
├── Exception               异常处理
├── Service                 服务类
├── Dispatch.php            入口
```

配置
--

[](#配置)

```
$config = [
    // swooleHttp服务
    'swoole_http' => [
        'host' => '127.0.0.1',
        'port' => 9501,
        'option' => [],
    ],
    // clickHouse服务
    'ch_db' => [
       'host' => '127.0.0.1',
       'port' => 9501,
       'username' => 'default',
       'password' => '',
       'db' => 'default',
   ],
    // redis服务
    'redis' => [
       'host' => '127.0.0.1',
       'port' => 6379,
       'password' => '',
   ],
];
```

例子
--

[](#例子)

```
$config = ['swoole_http' => [
    'host' => '127.0.0.1',
    'port' => 8123,
    'username' => 'default',
    'password' => '',
], 'ch_db' => [], 'redis' => []];
$tick = new Dispatch($config);
$tick->clickHouseOperator()->select(1);
```

测试
--

[](#测试)

```
#启动http服务
php example\click_house.php

#启动http服务
php example\http.php

#通过http服务访问接口
http://localhost:9501/Controller/action

#没有启动http服务时，直接访问接口
php example\api.php

#启动消费任务
php example\task.php
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

1743d ago

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/cabbagerun-php-stats-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/cabbagerun-php-stats-sdk/health.svg)](https://phpackages.com/packages/cabbagerun-php-stats-sdk)
```

###  Alternatives

[jowy/feature

Feature flagging API used for operational rampups and A/B testing.

3045.4k1](/packages/jowy-feature)

PHPackages © 2026

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