PHP code example of garrettw / dice

1. Go to this page and download the library: Download garrettw/dice 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/ */

    

garrettw / dice example snippets



class A {
	public $b;

	public function __construct(B $b) {
		$this->b = $b;
	}
}

class B {

}


	new Dice => new \Dice\Dice
	new DiceInstance => new \Dice\Instance
	new DiceRule => new \Dice\Rule