Thanks to visit codestin.com
Credit goes to github.com

Skip to content

graceman9/example-php-iterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example-php-generator

Example PHP generator

For now it's just a simple example of PHP iterator, let's see if it will grow up into something more fun.

This files intended to run as a CLI scripts:

php ./iterator1.php
php ./iterator2.php
php ./iterator3.php
php ./iterator4.php

There are four examples:

  1. Basic iterator based on \Iterator using PHP array functions: current(), next(), key(), reset().
  2. Basic iterator based on \Iterator using class property $key.
  3. Basic iterator based on \IteratorAggregate and \ArrayIterator.
  4. Basic iterator based on \IteratorAggregate and \ArrayIterator and abstract Collection class.

About

Example PHP iterator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages