PHP code example of hansott / lottery
1. Go to this page and download the library: Download hansott/lottery 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/ */
hansott / lottery example snippets
php
$lotteryFactory = new \HansOtt\Lottery\LotteryFactoryDefault();
$lottery = $lotteryFactory->getLottery();
$ticket = new \HansOtt\Lottery\Ticket(1, 100); // 1% chance to win
$won = $lottery->isLucky($ticket);