PHP code example of php-snippets / circular-array
1. Go to this page and download the library: Download php-snippets/circular-array 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/ */
php-snippets / circular-array example snippets
use PHPSnippets\DataStructures\CircularArray;
$circular = Circular::fromArray(array(1, 2, 3, 4));
// this foreach never ends, after 4 back to 1.
foreach($circular as $value){
echo $value;
}
bash
$ composer