jahem/lucky

lucky

Maintainers

Details

github.com/jahem/lucky

Source

Issues

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/jahem/lucky

1.0.0 2019-08-06 03:49 UTC

This package is auto-updated.

Last update: 2025-10-06 18:01:54 UTC


README

一个简单的抽奖内库

install

composer require jahem/lucky

demo

<?php
	require 'vendor/autoload.php';
	use lucky\lucky;
	$prize_arr = [
        '0' => [ 
            'id' => 1,
            'chance' => 90
            ],
        '1' => [
            'id' => 2,
            'chance' => 1
            ],
        '2' => [
            'id' => 3,
            'chance' => 0
            ],
        '3' => [
            'id' => 4,
            'chance' => 0
            ],
        '4' => [
            'id' => 5,
            'chance' => 0
            ],
    ];
	$lucky = new lucky($prize_arr);
	var_dump($lucky->start());
?>