functional programming with spl iterators debug...
TRANSCRIPT
Functional Programming with SPL Iterators
Debug Session
Marcus Börger
international PHP2004 conference
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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)); }}?>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)); }}?>
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
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
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
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
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
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
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
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)); }}?>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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