PHP code example of jpuck / peer-value-distributer

1. Go to this page and download the library: Download jpuck/peer-value-distributer 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/ */

    

jpuck / peer-value-distributer example snippets


use jpuck\PeerValueDistributer;

$books = [
    'John' => 'The Book of John',
    'Jane' => 'A Work by Jane',
    'Jeff' => 'Readings from Jeff',
    'Jose' => 'Words of Jose',
    'Jena' => 'Writing with Jena',
];

print_r( PeerValueDistributer::distribute($books, $count = 3) );