Re: php in free() error
| From: | Jason Barnett | Date: | Thu, 10 Feb 2005 23:47:42 +0000 |
| Subject: | Re: php in free() error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-208497@lists.php.net to get a copy of this message | ||
Gerard Samuel wrote:
...
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
<?php $array = array(0 => array('world')); class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator { function hasChildren() {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+pluginsreturn (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); } ?>
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc