Created
April 18, 2016 06:56
-
-
Save alexandr-parkhomenko/5e6edcb2f8660d5f42e9d0cd857f641c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = [ | |
[1,2], | |
[1,2,3], | |
[1,2,3,4] | |
]; | |
$callbackTest = new CallbackFilterIterator(new ArrayIterator($data), function (&$current) { | |
$current['test'] = 'test'; | |
return true; | |
}); | |
$callbackTest->rewind(); | |
$data = $callbackTest->current(); | |
$callbackTest->next(); | |
var_dump($data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment