Posted by Gerard Samuel on 02/11/05 01:03
Im playing around with iterators, and Im getting this error ->
php in free(): warning: chunk is already free
Im running php 5.0.3 on FreeBSD 5.3.
Any ideas what may be wrong?
Thanks
<?php
$array = array(0 => array('world'));
class RecursiveArrayIterator extends ArrayIterator implements
RecursiveIterator
{
function hasChildren()
{
return (is_array($this->current()));
}
function getChildren()
{
return new self($this->current());
}
}
$it = new RecursiveIteratorIterator(new RecursiveArrayIterator($array));
foreach($it as $key => $val)
{
var_dump($key, $val);
}
?>
Navigation:
[Reply to this message]
|