ID: 31926 Updated by: [EMAIL PROTECTED] Reported By: gms08701 at yahoo dot com -Status: Open +Status: Feedback Bug Type: SPL related Operating System: FreeBSD 5.3 PHP Version: 5.0.3 Assigned To: helly New Comment:
Please do the following: php run-tests.php ext/spl and copy the output here if you have also this: memcheck php ext/spl/tests/bug31926.php but just report if it states any real errors besides the messages stating that some memory is still accessible at program end. For me the problem is solved both in HEAD and 5.0.4-dev but i don't use FreeBSD. Previous Comments: ------------------------------------------------------------------------ [2005-02-12 20:47:30] gms08701 at yahoo dot com Ok, I was able to get something built from the snapshot. Using the original script example, Im getting the same error as with 5.0.2/3 -> $ /home/gsam/local/bin/php -v PHP 5.0.4-dev (cli) (built: Feb 12 2005 14:35:12) Copyright (c) 1997-2004 The PHP Group Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies $ /home/gsam/local/bin/php -f z.php int(0) string(5) "world" php in free(): warning: chunk is already free ------------------------------------------------------------------------ [2005-02-12 19:39:54] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip ------------------------------------------------------------------------ [2005-02-12 18:56:22] gms08701 at yahoo dot com I forgot to enter the results in my previous entry -> $ php -f z.php bool(true) bool(true) bool(true) ------------------------------------------------------------------------ [2005-02-12 18:52:19] gms08701 at yahoo dot com On what OS, are you trying your my example on?? Unfortunately, I dont have the knowledge on installing php on FreeBSD (I normally install it via the port). Im currently investigating if I can overcome this. But I was tinkering with the script this morning. -- $array = array(0); 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)); while($result = $it->valid()) { var_dump($result); $it->next(); } echo "\n\n"; while($result = (bool)each($array)) { var_dump($result); } -- Notice how the 1st while loop is returning (bool)TRUE *twice*, while the 2nd loop is returning (bool)TRUE *once*. $it->valid() should return (bool)FALSE the second time it was run. Shouldn't it??? ------------------------------------------------------------------------ [2005-02-11 20:56:07] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Works fine here. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31926 -- Edit this bug report at http://bugs.php.net/?id=31926&edit=1