PHP code example of jahem / lucky
1. Go to this page and download the library: Download jahem/lucky library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jahem / lucky example snippets
ucky\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());