functional programming with spl iterators debug...
TRANSCRIPT
![Page 1: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/1.jpg)
Functional Programming with SPL Iterators
Debug Session
Marcus Börger
international PHP2004 conference
![Page 2: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/2.jpg)
Marcus Börger Debug Session 2
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 3: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/3.jpg)
Marcus Börger Debug Session 3
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 4: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/4.jpg)
Marcus Börger Debug Session 4
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 5: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/5.jpg)
Marcus Börger Debug Session 5
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 6: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/6.jpg)
Marcus Börger Debug Session 6
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 7: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/7.jpg)
Marcus Börger Debug Session 7
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 8: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/8.jpg)
Marcus Börger Debug Session 8
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 9: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/9.jpg)
Marcus Börger Debug Session 9
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 10: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/10.jpg)
Marcus Börger Debug Session 10
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 11: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/11.jpg)
Marcus Börger Debug Session 11
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 12: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/12.jpg)
Marcus Börger Debug Session 12
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 13: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/13.jpg)
Marcus Börger Debug Session 13
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 14: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/14.jpg)
Marcus Börger Debug Session 14
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
0 => 1
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 15: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/15.jpg)
Marcus Börger Debug Session 15
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 1
![Page 16: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/16.jpg)
Marcus Börger Debug Session 16
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 1
![Page 17: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/17.jpg)
Marcus Börger Debug Session 17
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 1
![Page 18: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/18.jpg)
Marcus Börger Debug Session 18
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 1
![Page 19: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/19.jpg)
Marcus Börger Debug Session 19
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 1
![Page 20: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/20.jpg)
Marcus Börger Debug Session 20
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 1
![Page 21: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/21.jpg)
Marcus Börger Debug Session 21
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 1
![Page 22: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/22.jpg)
Marcus Börger Debug Session 22
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 23: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/23.jpg)
Marcus Börger Debug Session 23
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 24: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/24.jpg)
Marcus Börger Debug Session 24
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 25: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/25.jpg)
Marcus Börger Debug Session 25
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 26: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/26.jpg)
Marcus Börger Debug Session 26
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 27: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/27.jpg)
Marcus Börger Debug Session 27
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 28: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/28.jpg)
Marcus Börger Debug Session 28
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 29: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/29.jpg)
Marcus Börger Debug Session 29
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 30: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/30.jpg)
Marcus Börger Debug Session 30
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 31: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/31.jpg)
Marcus Börger Debug Session 31
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 32: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/32.jpg)
Marcus Börger Debug Session 32
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 33: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/33.jpg)
Marcus Börger Debug Session 33
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 34: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/34.jpg)
Marcus Börger Debug Session 34
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 2
![Page 35: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/35.jpg)
Marcus Börger Debug Session 35
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
0 => 11 => 20 => 31
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 36: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/36.jpg)
Marcus Börger Debug Session 36
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 31
![Page 37: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/37.jpg)
Marcus Börger Debug Session 37
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 31
![Page 38: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/38.jpg)
Marcus Börger Debug Session 38
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 31
![Page 39: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/39.jpg)
Marcus Börger Debug Session 39
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 31
![Page 40: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/40.jpg)
Marcus Börger Debug Session 40
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 31
![Page 41: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/41.jpg)
Marcus Börger Debug Session 41
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 31
![Page 42: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/42.jpg)
Marcus Börger Debug Session 42
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 31
![Page 43: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/43.jpg)
Marcus Börger Debug Session 43
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
0 => 11 => 20 => 311 => 32
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
![Page 44: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/44.jpg)
Marcus Börger Debug Session 44
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 45: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/45.jpg)
Marcus Börger Debug Session 45
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 46: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/46.jpg)
Marcus Börger Debug Session 46
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 47: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/47.jpg)
Marcus Börger Debug Session 47
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 48: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/48.jpg)
Marcus Börger Debug Session 48
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 49: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/49.jpg)
Marcus Börger Debug Session 49
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 50: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/50.jpg)
Marcus Börger Debug Session 50
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 51: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/51.jpg)
Marcus Börger Debug Session 51
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 52: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/52.jpg)
Marcus Börger Debug Session 52
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 32
![Page 53: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/53.jpg)
Marcus Börger Debug Session 53
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 323 => 4
![Page 54: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/54.jpg)
Marcus Börger Debug Session 54
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 323 => 4
![Page 55: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/55.jpg)
Marcus Börger Debug Session 55
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 323 => 4
![Page 56: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/56.jpg)
Marcus Börger Debug Session 56
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 323 => 4
![Page 57: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/57.jpg)
Marcus Börger Debug Session 57
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 323 => 4
![Page 58: Functional Programming with SPL Iterators Debug Sessionsomabo.de/talks/talks/200411_php_conference_frankfrurt_iterator_d… · Functional Programming with SPL Iterators Debug Session](https://reader034.vdocuments.us/reader034/viewer/2022052500/5f2b032f49619301707fae8f/html5/thumbnails/58.jpg)
Marcus Börger Debug Session 58
Deb
ug S
essi
on
<?php$a = array('1','2',array('31','32'),'4');$o = new RecursiveArrayIterator($a);$i = new RecursiveIteratorIterator($o);foreach($i as $key => $val) {
echo "$key => $val\n";}?>
<?phpclass RecursiveArrayIterator implements RecursiveIterator {
protected $ar;function __construct(Array $ar) {
$this->ar = $ar; }function rewind() {
reset($this->ar); }function valid() {
return !is_null(key($this->ar)); }function key() {
return key($this->ar); }function current() {
return current($this->ar); }function next() {
next($this->ar); }function hasChildren() {
return is_array(current($this->ar)); }function getChildren() {
return new RecursiveArrayIterator(current($this->ar)); }}?>
0 => 11 => 20 => 311 => 323 => 4