PHP code example of maike / iterable
1. Go to this page and download the library: Download maike/iterable 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/ */
maike / iterable example snippets
use Iterable\Iterator;
class DateTimeCollection extends Iterator {
public function __construct(\DateTime ...$items)
{
parent::__construct($items);
}
}
$datesCollection = new DateTimeCollection(
new \DateTime,
new \DateTime,
new \DateTime,
);
foreach ($datesCollection as $key => $date) {
// Do whatever you want
}