Re: php in free() error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerard Samuel wrote:
...
<?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);
}

?>

This may be a platform-specific bug. I ran your test script on my box (Win2000, php 5.0.3) and it executed with no errors.

--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux