PHP code example of cliffordvickrey / dogs-playing-poker

1. Go to this page and download the library: Download cliffordvickrey/dogs-playing-poker 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/ */

    

cliffordvickrey / dogs-playing-poker example snippets


// build the generator
$generator = Cliffordvickrey\DogsPlayingPoker\DogsPlayingPokerGenerator::build();

// generate a painting at random ...
$painting = $generator->generate();

// ... or a specific ID for the same painting every time
$painting = $generator->generate(1);

// get the painting as a blob ...
$blob = $dogsPlayingPoker->getDogsAsBlob();

// ... or as a stream
$stream = fopen('php://temp', 'w');
$painting->writeDogsToResource($stream);