PHPackages                             hao/prize-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. hao/prize-sdk

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

hao/prize-sdk
=============

php 抽奖处理

1.2(7y ago)240MITPHPPHP &gt;=5.5.0

Since May 31Pushed 7y agoCompare

[ Source](https://github.com/JZhao1020/prize-sdk)[ Packagist](https://packagist.org/packages/hao/prize-sdk)[ Docs](https://github.com/JZhao1020/prize-sdk)[ RSS](/packages/hao-prize-sdk/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)DependenciesVersions (5)Used By (0)

自定义抽奖概率计算
=========

[](#自定义抽奖概率计算)

开源地址
----

[](#开源地址)

\##1.安装

```
composer require hao/prize-sdk

```

\##2.示例

```
$arr = [
   ['id' => 1,'prize' => '一等奖', 'v' => 1],
   ['id' => 2,'prize' => '二等奖', 'v' => 1],
   ['id' => 3,'prize' => '三等奖', 'v' => 100],
   ['id' => 4,'prize' => '谢谢参与', 'v' => 1000],
];

$result = \Prize\Prize::init($arr);
dump($result);

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Every ~0 days

Total

4

Last Release

2905d ago

Major Versions

0.2 → 1.02018-05-31

PHP version history (2 changes)0.2PHP &gt;=5.4

1.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22906648?v=4)[hao](/maintainers/JZhao1020)[@JZhao1020](https://github.com/JZhao1020)

---

Tags

prize-sdk

### Embed Badge

![Health badge](/badges/hao-prize-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/hao-prize-sdk/health.svg)](https://phpackages.com/packages/hao-prize-sdk)
```

###  Alternatives

[aryelds/yii2-sweet-alert

A widget to flash sweet alert messages using SweetAlert plugin

3016.9k](/packages/aryelds-yii2-sweet-alert)

PHPackages © 2026

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